diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-28 23:25:01 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-28 23:29:29 -0800 |
commit | 6d07785127d5e26340eb24eec8542470bd5fe883 (patch) | |
tree | 48cfafce16d6e263a418b622ec705d78ca80dc93 /lib | |
parent | f30a3a06290387dd19c08b48cc7c31a18b359693 (diff) |
[ruby/irb] Remove unnecessary ignore_error in dispatch_seq
Just forgotten in https://github.com/ruby/irb/commit/a5804c3560bb1de3ea8e40002635bff87f6a2825
https://github.com/ruby/irb/commit/e42e548793
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/color.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb index eb157be71d..37b0c2263f 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -130,7 +130,7 @@ module IRB # :nodoc: in_symbol = symbol_state.scan_token(token) str.each_line do |line| line = Reline::Unicode.escape_for_print(line) - if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol, ignore_error: ignore_error) + if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol) colored << seq.map { |s| "\e[#{s}m" }.join('') colored << line.sub(/\Z/, clear) else @@ -195,9 +195,9 @@ module IRB # :nodoc: $VERBOSE = verbose end - def dispatch_seq(token, expr, str, in_symbol:, ignore_error:) + def dispatch_seq(token, expr, str, in_symbol:) if ERROR_TOKENS.include?(token) - ignore_error ? nil : TOKEN_SEQ_EXPRS[token][0] + TOKEN_SEQ_EXPRS[token][0] elsif in_symbol [YELLOW] elsif TOKEN_KEYWORDS.fetch(token, []).include?(str) |