@@ -196,20 +196,21 @@ def test_parse_some_strings
196
196
)
197
197
end
198
198
199
- def test_parse_broken_string
200
- # https://github.com/ruby/json/issues/138
201
- s = parse ( %{["\x80 "]} ) [ 0 ]
202
- assert_equal ( "\x80 " , s )
203
- assert_equal Encoding ::UTF_8 , s . encoding
204
- assert_equal false , s . valid_encoding?
205
-
206
- s = parse ( %{["\x80 "]} . b ) [ 0 ]
207
- assert_equal ( "\x80 " , s )
208
- assert_equal Encoding ::UTF_8 , s . encoding
209
- assert_equal false , s . valid_encoding?
210
-
211
- input = %{["\x80 "]} . dup . force_encoding ( Encoding ::US_ASCII )
212
- assert_raise ( Encoding ::InvalidByteSequenceError ) { parse ( input ) }
199
+ if RUBY_ENGINE != "jruby" # https://github.com/ruby/json/issues/138
200
+ def test_parse_broken_string
201
+ s = parse ( %{["\x80 "]} ) [ 0 ]
202
+ assert_equal ( "\x80 " , s )
203
+ assert_equal Encoding ::UTF_8 , s . encoding
204
+ assert_equal false , s . valid_encoding?
205
+
206
+ s = parse ( %{["\x80 "]} . b ) [ 0 ]
207
+ assert_equal ( "\x80 " , s )
208
+ assert_equal Encoding ::UTF_8 , s . encoding
209
+ assert_equal false , s . valid_encoding?
210
+
211
+ input = %{["\x80 "]} . dup . force_encoding ( Encoding ::US_ASCII )
212
+ assert_raise ( Encoding ::InvalidByteSequenceError ) { parse ( input ) }
213
+ end
213
214
end
214
215
215
216
def test_parse_big_integers
0 commit comments