1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

json_generator_test.rb: no Bignum

* test/json/json_generator_test.rb (test_broken_bignum): get rid
  of use of Bignum, obsolete name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-09-09 09:27:38 +00:00
parent 646c53895f
commit 7f6410f02d

5
test/json/json_generator_test.rb Normal file → Executable file
View file

@ -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