File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def setup
53
53
end
54
54
55
55
def scan_tokens encoder , options
56
- states = Array ( options [ :state ] || @state )
56
+ states = Array ( options [ :state ] || @state ) . dup
57
57
value_expected = @value_expected
58
58
59
59
until eos?
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def setup
19
19
end
20
20
21
21
def scan_tokens encoder , options
22
- states = Array ( options [ :state ] || @state )
22
+ states = Array ( options [ :state ] || @state ) . dup
23
23
string_delimiter = nil
24
24
25
25
until eos?
@@ -119,7 +119,7 @@ def scan_tokens encoder, options
119
119
120
120
else
121
121
#:nocov:
122
- raise_inspect 'Unknown state' , encoder
122
+ raise_inspect 'Unknown state: %p' % [ states . last ] , encoder
123
123
#:nocov:
124
124
125
125
end
@@ -215,7 +215,7 @@ def scan_tokens encoder, options
215
215
end
216
216
217
217
if options [ :keep_state ]
218
- @state = states
218
+ @state = states . dup
219
219
end
220
220
221
221
while state = states . pop
You can’t perform that action at this time.
0 commit comments