diff options
Diffstat (limited to 'lib/json/pure/parser.rb')
-rw-r--r-- | lib/json/pure/parser.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/json/pure/parser.rb b/lib/json/pure/parser.rb index cb531f4..6a0192c 100644 --- a/lib/json/pure/parser.rb +++ b/lib/json/pure/parser.rb @@ -119,7 +119,7 @@ module JSON @create_id = opts[:create_id] || JSON.create_id @object_class = opts[:object_class] || Hash @array_class = opts[:array_class] || Array - @match = opts[:match] + @json_match = opts[:match] # @match is an ivar in rbx's strscan end alias source string @@ -189,8 +189,8 @@ module JSON if string.respond_to?(:force_encoding) string.force_encoding(::Encoding::UTF_8) end - if @create_additions and @match - for (regexp, klass) in @match + if @create_additions and @json_match + for (regexp, klass) in @json_match klass.json_creatable? or next string =~ regexp and return klass.json_create(string) end |