summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrazokulover <yuhei.nakasaka@gmail.com>2024-11-14 20:24:26 +0900
committerJean Boussier <jean.boussier@gmail.com>2024-11-18 04:23:18 +0100
commit62e1469e8bcf379cd8bb9f0f2381be0bc22ce82a (patch)
tree8499cce22c2f70a0bd305da806a30fc73c4ed346
parent8fe8021f5a5b48520f9c1095e7cfa1fd416b6dfd (diff)
[ruby/json] Fix redundant to_str call
https://github.com/ruby/json/commit/61f022dfbd
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12103
-rw-r--r--ext/json/lib/json/common.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index 03aaaa6e7e..4c6b2e1a72 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -26,7 +26,7 @@ module JSON
elsif object.respond_to?(:to_str)
str = object.to_str
if str.is_a?(String)
- return JSON.parse(object.to_str, opts)
+ return JSON.parse(str, opts)
end
end