Project

General

Profile

Actions

Bug #10543

closed

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

Added by akr (Akira Tanaka) almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-11-26 trunk 48577) [x86_64-linux]
[ruby-dev:48741]

Description

以下のように、/(?a(b|\g))/ というだけのソースは
ruby -c では問題無しとなりますが、
Ripper.sexp では構文木でなく nil が返ってきてしまいます。

% cat z.rb                   
/(?<n>a(b|\g<n>))/
% ./ruby -c z.rb
Syntax OK
% ./ruby -rripper -e 'p Ripper.sexp(STDIN.read)' < z.rb  
nil
% ./ruby -v                                                
ruby 2.2.0dev (2014-11-26 trunk 48577) [x86_64-linux]

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #10437: ruby -c and ripper inconsistency: /*/Closed10/28/2014Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0