diff options
author | Nobuhiro IMAI <nov@yo.rim.or.jp> | 2020-03-24 15:24:01 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-02-03 00:09:32 +0900 |
commit | b0fb2082187fe3cd247a92471aa42d3e6f779e51 (patch) | |
tree | 80fa55d60240797084b0ed47336cf4df92ad6247 /lib/irb/ruby-lex.rb | |
parent | 739f9297c562a387aa012bad781ac2f07f434c1e (diff) | |
download | ruby-b0fb2082187fe3cd247a92471aa42d3e6f779e51.tar.gz |
[ruby/irb] follow up the actual line number
https://github.com/ruby/irb/commit/7aed8fe3b1
Diffstat (limited to 'lib/irb/ruby-lex.rb')
-rw-r--r-- | lib/irb/ruby-lex.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 938e9d42a6..ce94797dad 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -223,7 +223,10 @@ class RubyLex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") - next if l == "\n" + if l == "\n" + @exp_line_no += 1 + next + end @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next |