This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
skip(token_type, error = true)
public
Skips the next token if its type is token_type.
Optionally raises an error if the next token is not of the expected type.
# File lib/rdoc/markup/parser.rb, line 445
def skip token_type, error = true
type, = get
return unless type # end of stream
return @current_token if token_type == type
unget
raise ParseError, "expected #{token_type} got #{@current_token.inspect}" if error
end