File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -3251,18 +3251,12 @@ def test_ascii_incomat_inspect
32513251 assert_equal ( '"\\u3042\\u3044\\u3046"' , S ( "\u3042 \u3044 \u3046 " . encode ( e ) ) . inspect )
32523252 assert_equal ( '"ab\\"c"' , S ( "ab\" c" . encode ( e ) ) . inspect , bug4081 )
32533253 end
3254- begin
3255- verbose , $VERBOSE = $VERBOSE, nil
3256- ext = Encoding . default_external
3257- Encoding . default_external = "us-ascii"
3258- $VERBOSE = verbose
3254+
3255+ EnvUtil . with_default_external ( Encoding ::US_ASCII ) do
32593256 i = S ( "abc\" \\ " . force_encoding ( "utf-8" ) ) . inspect
3260- ensure
3261- $VERBOSE = nil
3262- Encoding . default_external = ext
3263- $VERBOSE = verbose
3257+
3258+ assert_equal ( '"abc\\"\\\\"' , i , bug4081 )
32643259 end
3265- assert_equal ( '"abc\\"\\\\"' , i , bug4081 )
32663260 end
32673261
32683262 def test_dummy_inspect
You can’t perform that action at this time.
0 commit comments