diff --git a/lib/json/common.rb b/lib/json/common.rb index 03aaaa6e..4c6b2e1a 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -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