Skip to content

Commit

Permalink
json_generator_test.rb: no Bignum
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Sep 9, 2016
1 parent 646c538 commit 7f6410f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/json/json_generator_test.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,13 @@ def foo.to_h
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
Expand Down

0 comments on commit 7f6410f

Please sign in to comment.