Forum: Ruby-dev ruby -c and ripper inconsistency: /(?<n>a(b|\g<n>))/

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
4c9779ffff66b09982330c24aca79ab7?d=identicon&s=25 Nobuyoshi N. (nobu)
on 2014-12-01 00:38
(Received via mailing list)
Issue #10543 has been updated by Nobuyoshi Nakada.

Related to Bug #10437: ruby -c and ripper inconsistency: /*/ added

Bug #10543: ruby -c and ripper inconsistency: /(?<n>a(b|\g<n>))/

* Author: Akira Tanaka
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.2.0dev (2014-11-26 trunk 48577) [x86_64-linux]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED
以下のように、/(?<n>a(b|\g<n>))/ というだけのソースは
ruby -c では問題無しとなりますが、
Ripper.sexp では構文木でなく nil が返ってきてしまいます。

% cat z.rb
% ./ruby -c z.rb
Syntax OK
% ./ruby -rripper -e 'p Ripper.sexp(' < z.rb
% ./ruby -v
ruby 2.2.0dev (2014-11-26 trunk 48577) [x86_64-linux]
This topic is locked and can not be replied to.