From b0fb2082187fe3cd247a92471aa42d3e6f779e51 Mon Sep 17 00:00:00 2001 From: Nobuhiro IMAI Date: Tue, 24 Mar 2020 15:24:01 +0900 Subject: [ruby/irb] follow up the actual line number https://github.com/ruby/irb/commit/7aed8fe3b1 --- lib/irb/ruby-lex.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3