Skip to content

Commit 61f022d

Browse files
committed
Fix redundant to_str call
1 parent d0dae8f commit 61f022d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/json/common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def [](object, opts = {})
2626
elsif object.respond_to?(:to_str)
2727
str = object.to_str
2828
if str.is_a?(String)
29-
return JSON.parse(object.to_str, opts)
29+
return JSON.parse(str, opts)
3030
end
3131
end
3232

0 commit comments

Comments
 (0)