diff options
author | murphy <murphy@rubychan.de> | 2008-12-25 01:22:30 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2008-12-25 01:22:30 +0000 |
commit | 79a313948f2277cf0f2e238d5765a71fee03e089 (patch) | |
tree | 7f6c2de879231f1b7a30d9ba481984e79fede9c1 /lib/coderay/scanners/json.rb | |
parent | bca06f1ec361537c4c7f1368ca8838be2940dafe (diff) | |
download | coderay-79a313948f2277cf0f2e238d5765a71fee03e089.tar.gz |
Fixes for Ruby 1.9.
Diffstat (limited to 'lib/coderay/scanners/json.rb')
-rw-r--r-- | lib/coderay/scanners/json.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/coderay/scanners/json.rb b/lib/coderay/scanners/json.rb index ae941a0..eb67347 100644 --- a/lib/coderay/scanners/json.rb +++ b/lib/coderay/scanners/json.rb @@ -34,11 +34,11 @@ module Scanners elsif match = scan(/ [:,\[{\]}] /x) kind = :operator case match - when '{': stack << :object; key_expected = true - when '[': stack << :array - when ':': key_expected = false - when ',': key_expected = true if stack.last == :object - when '}', ']': stack.pop # no error recovery, but works for valid JSON + when '{' then stack << :object; key_expected = true + when '[' then stack << :array + when ':' then key_expected = false + when ',' then key_expected = true if stack.last == :object + when '}', ']' then stack.pop # no error recovery, but works for valid JSON end elsif match = scan(/ true | false | null /x) kind = IDENT_KIND[match] |