Skip to content

Commit

Permalink
Fix redundant to_str call
Browse files Browse the repository at this point in the history
  • Loading branch information
YuheiNakasaka committed Nov 14, 2024
1 parent d0dae8f commit 61f022d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def [](object, opts = {})
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

Expand Down

0 comments on commit 61f022d

Please sign in to comment.