Skip to content

Commit

Permalink
work around Array#slice! bug
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Aug 28, 2021
1 parent e68d892 commit 5a092bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/citrus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ def exec(input, events=[])
events << CLOSE
events << length
else
events.slice!(start, index)
events.slice!(start..index)
end

events
Expand Down Expand Up @@ -1213,7 +1213,7 @@ def exec(input, events=[])
events << CLOSE
events << length
else
events.slice!(start, index)
events.slice!(start..index)
end

events
Expand Down Expand Up @@ -1283,7 +1283,7 @@ def initialize(input, events=[], offset=0)

while events[0].elide?
elisions.unshift(events.shift)
events.slice!(-2, events.length)
events.slice!(-2..events.length)
end

events[0].extend_match(self)
Expand Down

0 comments on commit 5a092bc

Please sign in to comment.