File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 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
479479 end
480480 end
481481
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 )
486484 end
487485end
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ def test_argument_encoding
2424 source = "{}" . encode ( "UTF-16" )
2525 JSON ::Parser . new ( source )
2626 assert_equal Encoding ::UTF_16 , source . encoding
27- end if defined? ( Encoding :: UTF_16 )
27+ end
2828
2929 def test_argument_encoding_for_binary
3030 source = "{}" . encode ( "ASCII-8BIT" )
3131 JSON ::Parser . new ( source )
3232 assert_equal Encoding ::ASCII_8BIT , source . encoding
33- end if defined? ( Encoding :: ASCII_8BIT )
33+ end
3434
3535 def test_error_message_encoding
3636 pend if RUBY_ENGINE == 'truffleruby'
@@ -42,7 +42,7 @@ def test_error_message_encoding
4242 }
4343 assert_equal ( Encoding ::UTF_8 , e . message . encoding , bug10705 )
4444 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 )
4646
4747 def test_parsing
4848 parser = JSON ::Parser . new ( '"test"' )
You can’t perform that action at this time.
0 commit comments