Actions
Bug #15648
closedRipper::SCANNER_EVENTS に ignored_sp が含まれていない
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-03-07 trunk 67190) [x86_64-linux]
Backport:
Description
Ripper::Filter
にて <<~
形式のヒアドキュメント文字列を解析した際に ignored_sp
イベントが実行されますが、Ripper::SCANNER_EVENTS
には含まれていません
ruby -e "require 'ripper';p Ripper::SCANNER_EVENTS.grep(/ignore/)"
[:ignored_nl]
ruby -e 'require "ripper";class RipperT < Ripper::Filter;def on_default(event, tok, f);p event;end;end;str="<<~TEST\n :test\nTEST";RipperT.new(str).parse'
:on_heredoc_beg
:on_nl
:on_ignored_sp
:on_tstring_content
:on_heredoc_end
リファレンスマニュアル の Ripper::Filter
に
Ruby プログラムを解析して、
Ripper::SCANNER_EVENTS
にあるスキャナ イベントを実行します。
と書かれているため、含まれているのが適当だと考えます
Updated by nobu (Nobuyoshi Nakada) over 5 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r67200.
Add ignored_sp event
- ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp
event which will be fired from Ripper::Lexer#on_heredoc_dedent
method. [ruby-core:91727] [Bug #15648]
Updated by nobu (Nobuyoshi Nakada) over 5 years ago
- Description updated (diff)
- Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN to 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED
Updated by naruse (Yui NARUSE) over 5 years ago
- Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE
ruby_2_6 r67208 merged revision(s) 67200.
Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago
- Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE to 2.4: REQUIRED, 2.5: DONE, 2.6: DONE
ruby_2_5 r67242 merged revision(s) 67200.
Actions
Like0
Like0Like0Like0Like0Like0