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'
```
This commit is contained in:
Hiroshi SHIBATA 2025-09-11 10:34:14 +09:00
parent 5e7e6c586e
commit 0dc1cd407e

View File

@ -9,6 +9,8 @@ class JSONGenericObjectTest < Test::Unit::TestCase
else
omit("JSON::GenericObject is not available")
end
rescue NameError
omit("JSON::GenericObject is not available")
end
def test_attributes