diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb old mode 100644 new mode 100755 index 18b08337f8..86be398f46 --- a/test/json/json_generator_test.rb +++ b/test/json/json_generator_test.rb @@ -277,12 +277,13 @@ EOT if defined?(JSON::Ext::Generator) def test_broken_bignum # [ruby-core:38867] pid = fork do - Bignum.class_eval do + x = 1 << 64 + x.class.class_eval do def to_s end end begin - JSON::Ext::Generator::State.new.generate(1<<64) + JSON::Ext::Generator::State.new.generate(x) exit 1 rescue TypeError exit 0