summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/sass.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-07-12 14:57:46 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-07-12 14:57:46 +0200
commit94e4bb3366537def28ed257fcf2b70a634711c9f (patch)
tree2d176856dbd826188ed4b13c686fcd8c83c2bf67 /lib/coderay/scanners/sass.rb
parentab1bb26c29cc69a93da2d808ae8cd7b3cad6ea25 (diff)
downloadcoderay-94e4bb3366537def28ed257fcf2b70a634711c9f.tar.gz
don't change value of objects you don't own
Diffstat (limited to 'lib/coderay/scanners/sass.rb')
-rw-r--r--lib/coderay/scanners/sass.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/scanners/sass.rb b/lib/coderay/scanners/sass.rb
index e20bebe..7ba9bf5 100644
--- a/lib/coderay/scanners/sass.rb
+++ b/lib/coderay/scanners/sass.rb
@@ -19,7 +19,7 @@ module Scanners
end
def scan_tokens encoder, options
- states = Array(options[:state] || @state)
+ states = Array(options[:state] || @state).dup
string_delimiter = nil
until eos?
@@ -119,7 +119,7 @@ module Scanners
else
#:nocov:
- raise_inspect 'Unknown state', encoder
+ raise_inspect 'Unknown state: %p' % [states.last], encoder
#:nocov:
end
@@ -215,7 +215,7 @@ module Scanners
end
if options[:keep_state]
- @state = states
+ @state = states.dup
end
while state = states.pop