From: martyn.jago@... Date: 2017-10-24T08:15:59+00:00 Subject: [ruby-core:83537] [Ruby trunk Bug#14046] Ripper loses DATA Issue #14046 has been reported by mjago (Martyn Jago). ---------------------------------------- Bug #14046: Ripper loses DATA https://bugs.ruby-lang.org/issues/14046 * Author: mjago (Martyn Jago) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-10-19 trunk 60213) [x86_64-darwin13] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Since the following is a valid self-contained script: ~~~ ruby p DATA.read # comment __END__ abc ~~~ should the `__END__` suffix data be preserved with `:on___end__` ? Alternatively should there be an `:on_ignored___end` token to preserve DATA? Notably the comment content is preserved: ~~~ [[[1, 0], :on_ident, "p", EXPR_CMDARG], [[1, 1], :on_sp, " ", EXPR_CMDARG], [[1, 2], :on_const, "DATA", EXPR_ARG], [[1, 6], :on_period, ".", EXPR_DOT], [[1, 7], :on_ident, "read", EXPR_ARG], [[1, 11], :on_sp, " ", EXPR_ARG], [[1, 12], :on_comment, "# comment\n", EXPR_ARG], [[2, 0], :on___end__, "__END__\n", EXPR_BEG]] ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: