diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-12 14:57:46 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-12 14:57:46 +0200 |
commit | 94e4bb3366537def28ed257fcf2b70a634711c9f (patch) | |
tree | 2d176856dbd826188ed4b13c686fcd8c83c2bf67 /lib/coderay/scanners/sass.rb | |
parent | ab1bb26c29cc69a93da2d808ae8cd7b3cad6ea25 (diff) | |
download | coderay-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.rb | 6 |
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 |