diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 12:48:49 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 13:24:24 +0900 |
commit | cc66272e5061020cac6864bbc2f68f7d327ecfbb (patch) | |
tree | 7ef38276f291348c06d1dc7b2a769239cf2435e6 /lib/irb | |
parent | 8552e9d69693b1d3f99a30d846b9dcc30bf590c2 (diff) | |
download | ruby-cc66272e5061020cac6864bbc2f68f7d327ecfbb.tar.gz |
parse.y: flush invalid char
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/color.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb index aa4c60aa12..b53cc75035 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -66,9 +66,11 @@ module IRB # :nodoc: class Lexer < Ripper::Lexer if method_defined?(:token) - def on_parse_error(mesg) + def on_error(mesg) @buf.push Elem.new([lineno(), column()], __callee__, token(), state()) end + alias on_parse_error on_error + alias compile_error on_error end end |