rouge-ruby/rouge · error · RuntimeError
RegexLexer#group is deprecated: use #groups instead
Error message
RegexLexer#group is deprecated: use #groups instead
What it means
Error "RegexLexer#group is deprecated: use #groups instead" thrown in rouge-ruby/rouge.
Source
Thrown at lib/rouge/regex_lexer.rb:565
end
# Yield a token.
#
# @param tok
# the token type
# @param val
# (optional) the string value to yield. If absent, this defaults
# to the entire last match.
def token(tok, val=@current_stream[0])
yield_token(tok, val)
end
# @deprecated
#
# Yield a token with the next matched group. Subsequent calls
# to this method will yield subsequent groups.
def group(tok)
raise "RegexLexer#group is deprecated: use #groups instead"
end
# Yield tokens corresponding to the matched groups of the current
# match.
def groups(*tokens)
tokens.each_with_index do |tok, i|
yield_token(tok, @current_stream[i+1])
end
end
# Delegate the lex to another lexer. We use the `continue_lex` method
# so that #reset! will not be called. In this way, a single lexer
# can be repeatedly delegated to while maintaining its own internal
# state stack.
#
# @param [#lex] lexer
# The lexer or lexer class to delegate to
# @param [String] textView on GitHub (pinned to bd7dad7b09)
When it happens
Trigger: Thrown at lib/rouge/regex_lexer.rb:565 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rouge-ruby/rouge@bd7dad7b09 (2026-08-23).
Data as JSON: /api/errors/b86acde390efbdc6.
Report an issue: GitHub.