Project

General

Profile

Bug #10437

ruby -c and ripper inconsistency: /*/

Added by akr (Akira Tanaka) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-10-27 trunk 48168) [x86_64-linux]
[ruby-dev:48714]

Description

/*/ という、間違った regexp リテラルは
ruby -c ではちゃんとエラーになるのですが、
Ripper.sexp ではエラーになりません。

% cat z.rb
/*/
% ruby -c z.rb                                        
z.rb:1: target of repeat operator is not specified: /*/
% ruby -rripper -e 'p Ripper.sexp(STDIN.read)'  < z.rb
[:program, [[:regexp_literal, [[:@tstring_content, "*", [1, 1]]], [:@regexp_end, "/", [1, 2]]]]]
% ruby -v
ruby 2.2.0dev (2014-10-27 trunk 48168) [x86_64-linux]

Ripper では regexp object を作らないからでしょうが、
syntax error を調べる目的に対して不都合ではあります。


Related issues

Related to Ruby trunk - Bug #10543: ruby -c and ripper inconsistency: /(?<n>a(b|\g<n>))/Closed11/25/2014Actions

Associated revisions

Revision 4cb3f72f
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 48507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Revision 1549a6b7
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 48673
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: check single regexp only

  • parse.y (regexp_contents): check in ripper only if the whole content is a single regexp without interpolation. [ruby-dev:48714] [Bug #10437]

Revision 0a190272
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

Revision 48674
Added by nobu (Nobuyoshi Nakada) over 4 years ago

parse.y: preserve tSTRING_CONTENT results

  • parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437]

History

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r48507.


ChangeLog: add issue ref

  • ChangeLog: r48504 fixed [ruby-dev:48714] [Bug #10437]

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

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

Also available in: Atom PDF