Skip to content

Commit

Permalink
Merge remote-tracking branch 'nobu/no-Bignum'
Browse files Browse the repository at this point in the history
  • Loading branch information
flori committed Sep 9, 2016
2 parents f1ca4fe + 4c87156 commit 3a71f73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -115,7 +115,7 @@ generate a JSON document from an array or hash:

```ruby
document = JSON 'test' => 23 # => "{\"test\":23}"
document = JSON['test'] => 23 # => "{\"test\":23}"
document = JSON['test' => 23] # => "{\"test\":23}"
```

and
Expand Down
5 changes: 3 additions & 2 deletions tests/json_generator_test.rb
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 3a71f73

Please sign in to comment.