We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25c1818 commit 8fb2c2fCopy full SHA for 8fb2c2f
lib/json_mend/parser.rb
@@ -49,9 +49,9 @@ def parse_json
49
when '['
50
@scanner.getch # consume '['
51
return parse_array
52
- when ->(c) { !@context.empty? && (STRING_DELIMITERS.include?(c) || c&.match?(/[a-zA-Z]/)) }
+ when ->(c) { STRING_DELIMITERS.include?(c) || c&.match?(/[a-zA-Z]/) }
53
return parse_string
54
- when ->(c) { !@context.empty? && (c&.match?(/\d/) || c == '-' || c == '.') }
+ when ->(c) { c&.match?(/\d/) || c == '-' || c == '.' }
55
return parse_number
56
when *COMMENT_DELIMETERS
57
return parse_comment
0 commit comments