summaryrefslogtreecommitdiff
path: root/test/json/json_common_interface_test.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-03-26 15:19:26 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-28 12:44:53 +0900
commite8c46f4ca5e6ba2638fbfc81fdb9d141cd88e99a (patch)
tree600722c172e1cded6614c734066c6c8115c53ae9 /test/json/json_common_interface_test.rb
parent80a59a62441c0938d0a29fcd5dd95f8024db6ddf (diff)
[ruby/json] JSON.load invoke the proc callback directly from the parser.
And substitute the return value like `Marshal.load` doesm which I can only assume was the intent. This also open the door to re-implement all the `create_addition` logic in `json/common.rb`. https://github.com/ruby/json/commit/73d2137fd3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13004
Diffstat (limited to 'test/json/json_common_interface_test.rb')
-rw-r--r--test/json/json_common_interface_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/json/json_common_interface_test.rb b/test/json/json_common_interface_test.rb
index 96f7ccdf92..3f4f27439d 100644
--- a/test/json/json_common_interface_test.rb
+++ b/test/json/json_common_interface_test.rb
@@ -110,7 +110,7 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase
def test_load_with_proc
visited = []
- JSON.load('{"foo": [1, 2, 3], "bar": {"baz": "plop"}}', proc { |o| visited << JSON.dump(o) })
+ JSON.load('{"foo": [1, 2, 3], "bar": {"baz": "plop"}}', proc { |o| visited << JSON.dump(o); o })
expected = [
'"foo"',