File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -479,9 +479,7 @@ def test_string_ext_included_calls_super
479
479
end
480
480
end
481
481
482
- if defined? ( Encoding )
483
- def test_nonutf8_encoding
484
- assert_equal ( "\" 5\u{b0} \" " , "5\xb0 " . force_encoding ( "iso-8859-1" ) . to_json )
485
- end
482
+ def test_nonutf8_encoding
483
+ assert_equal ( "\" 5\u{b0} \" " , "5\xb0 " . force_encoding ( "iso-8859-1" ) . to_json )
486
484
end
487
485
end
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ def test_argument_encoding
24
24
source = "{}" . encode ( "UTF-16" )
25
25
JSON ::Parser . new ( source )
26
26
assert_equal Encoding ::UTF_16 , source . encoding
27
- end if defined? ( Encoding :: UTF_16 )
27
+ end
28
28
29
29
def test_argument_encoding_for_binary
30
30
source = "{}" . encode ( "ASCII-8BIT" )
31
31
JSON ::Parser . new ( source )
32
32
assert_equal Encoding ::ASCII_8BIT , source . encoding
33
- end if defined? ( Encoding :: ASCII_8BIT )
33
+ end
34
34
35
35
def test_error_message_encoding
36
36
pend if RUBY_ENGINE == 'truffleruby'
@@ -42,7 +42,7 @@ def test_error_message_encoding
42
42
}
43
43
assert_equal ( Encoding ::UTF_8 , e . message . encoding , bug10705 )
44
44
assert_include ( e . message , json , bug10705 )
45
- end if defined? ( Encoding :: UTF_8 ) and defined? ( JSON ::Ext ::Parser )
45
+ end if defined? ( JSON ::Ext ::Parser )
46
46
47
47
def test_parsing
48
48
parser = JSON ::Parser . new ( '"test"' )
You can’t perform that action at this time.
0 commit comments