Skip to content

Commit 0dc1cd4

Browse files
committed
Handle uninitialized constant JSON::GenericObject at ruby/ruby.
``` 1) Error: JSONGenericObjectTest#test_from_hash: Test::Unit::ProxyError: uninitialized constant JSON::GenericObject /Users/hsbt/Documents/github.com/ruby/ruby/.ext/common/json/common.rb:1006:in 'JSON.const_missing' /Users/hsbt/Documents/github.com/ruby/ruby/test/json/json_generic_object_test.rb:8:in 'JSONGenericObjectTest#setup' ```
1 parent 5e7e6c5 commit 0dc1cd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/json/json_generic_object_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ def setup
99
else
1010
omit("JSON::GenericObject is not available")
1111
end
12+
rescue NameError
13+
omit("JSON::GenericObject is not available")
1214
end
1315

1416
def test_attributes

0 commit comments

Comments
 (0)