Project

General

Profile

Bug #16981

[ripper] mismatched indentations warning has disappeared since 2.6

Added by nobu (Nobuyoshi Nakada) 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:98928]

Description

$ ruby2.5 -v -rripper -e 'r = Ripper.new("begin\n  end"); def r.warn(*e) p e; end; r.parse'
ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-darwin19]
["mismatched indentations at '%s' with '%s' at %d", "end", "begin", 1]

$ ruby2.6 -v -rripper -e 'r = Ripper.new("begin\n  end"); def r.warn(*e) p e; end; r.parse'
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]

$ ruby2.7 -v -rripper -e 'r = Ripper.new("begin\n  end"); def r.warn(*e) p e; end; r.parse'
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
#1

Updated by nobu (Nobuyoshi Nakada) 7 months ago

  • Status changed from Assigned to Closed

Applied in changeset git|263b941321c3de6afc8f9dafbc2625f866b7437e.


[ripper] fix mismatched indentations warning [Bug #16981]

The scanner location has to be set from lex.ptok before it is
flushed by dispatching the scanner event.

Updated by nagachika (Tomoyuki Chikanaga) 7 months ago

  • Backport changed from 2.5: DONTNEED, 2.6: REQUIRED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: REQUIRED, 2.7: DONE

ruby_2_7 d8a32b146561a0ddd3e60da9863a082b7e7725db merged revision(s) 263b941321c3de6afc8f9dafbc2625f866b7437e.

Also available in: Atom PDF