summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2025-09-11 10:34:14 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-09-11 11:54:49 +0900
commit0dc1cd407e7775610f2bcaef6c1282369867f91c (patch)
treee8166e8dd1bac8eb4fd00fb3806a0654ed856bee
parent5e7e6c586e49a7147b3610a66b49e1d7ccd04baa (diff)
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' ```
-rw-r--r--test/json/json_generic_object_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/json/json_generic_object_test.rb b/test/json/json_generic_object_test.rb
index 333da70479..995d57edaf 100644
--- a/test/json/json_generic_object_test.rb
+++ b/test/json/json_generic_object_test.rb
@@ -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