diff options
author | Rahim Packir Saibo <[email protected]> | 2025-03-05 18:03:03 +0000 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-03-06 18:29:27 +0900 |
commit | e20f1f76f4d7479faa112b612ba6f712a46c49fc () | |
tree | 220f6d4009c1fbbcfc19df429ba6761c37e0b51e | |
parent | f7af75d3d9239dadd66382e421f63790ad46aeb7 (diff) |
[ruby/json] Fix JSON::GeneratorError#detailed_message with Ruby < 3.2
https://.com/ruby/json/commit/2e015ff839
-rw-r--r-- | ext/json/lib/json/common.rb | 7 | ||||
-rwxr-xr-x | test/json/json_generator_test.rb | 8 |
2 files changed, 13 insertions, 2 deletions
@@ -152,10 +152,13 @@ module JSON end def detailed_message(...) if @invalid_object.nil? - super else - "#{super}\nInvalid object: #{@invalid_object.inspect}" end end end @@ -410,6 +410,14 @@ class JSONGeneratorTest < Test::Unit::TestCase end end def test_json_generate_unsupported_types assert_raise JSON::GeneratorError do generate(Object.new, strict: true) |