Project

General

Profile

Actions

Bug #16981

closed

[ripper] mismatched indentations warning has disappeared since 2.6

Added by nobu (Nobuyoshi Nakada) almost 4 years ago. Updated about 3 years ago.

Status:
Closed
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]
Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 4 years 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) almost 4 years 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.

Updated by usa (Usaku NAKAMURA) about 3 years ago

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

backported into ruby_2_6 at r67906.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0