Skip to content

Commit

Permalink
turns out stdlib already has a way to do this :\
Browse files Browse the repository at this point in the history
  • Loading branch information
jneen committed Oct 23, 2012
1 parent deb214f commit 8b86534
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rouge/regex_lexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ def pop!(times=1)
raise 'empty stack!' if stack.empty?

debug { " popping stack: #{times}" }
times.times { stack.pop }

stack.pop(times)

nil
end

# reset the stack back to `[:root]`.
Expand Down

0 comments on commit 8b86534

Please sign in to comment.