summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/json.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2008-12-25 01:22:30 +0000
committermurphy <murphy@rubychan.de>2008-12-25 01:22:30 +0000
commit79a313948f2277cf0f2e238d5765a71fee03e089 (patch)
tree7f6c2de879231f1b7a30d9ba481984e79fede9c1 /lib/coderay/scanners/json.rb
parentbca06f1ec361537c4c7f1368ca8838be2940dafe (diff)
downloadcoderay-79a313948f2277cf0f2e238d5765a71fee03e089.tar.gz
Fixes for Ruby 1.9.
Diffstat (limited to 'lib/coderay/scanners/json.rb')
-rw-r--r--lib/coderay/scanners/json.rb10
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]