Skip to content

Commit e42e548

Browse files
committed
Remove unnecessary ignore_error in dispatch_seq
Just forgotten in a5804c3
1 parent a5804c3 commit e42e548

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/irb/color.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def colorize_code(code, complete: true, ignore_error: false)
130130
in_symbol = symbol_state.scan_token(token)
131131
str.each_line do |line|
132132
line = Reline::Unicode.escape_for_print(line)
133-
if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol, ignore_error: ignore_error)
133+
if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol)
134134
colored << seq.map { |s| "\e[#{s}m" }.join('')
135135
colored << line.sub(/\Z/, clear)
136136
else
@@ -195,9 +195,9 @@ def scan(code, allow_last_error:)
195195
$VERBOSE = verbose
196196
end
197197

198-
def dispatch_seq(token, expr, str, in_symbol:, ignore_error:)
198+
def dispatch_seq(token, expr, str, in_symbol:)
199199
if ERROR_TOKENS.include?(token)
200-
ignore_error ? nil : TOKEN_SEQ_EXPRS[token][0]
200+
TOKEN_SEQ_EXPRS[token][0]
201201
elsif in_symbol
202202
[YELLOW]
203203
elsif TOKEN_KEYWORDS.fetch(token, []).include?(str)

0 commit comments

Comments
 (0)