Project

General

Profile

Actions

Bug #1071

closed

ripper: 改行を含む正規表現のon_regexp_endが変

Added by znz (Kazuhiro NISHIYAMA) almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.1p5000 (2009-01-30 trunk 21885) [i686-linux]
Backport:

Description

=begin
正規表現に改行が含まれていると改行の後がon_tstring_contentではなくon_regexp_endに含まれるのは変なのではないでしょうか?

% ruby-trunk -v -r ripper -r pp -e 'pp Ripper.lex("/foo\nbar/")'
ruby 1.9.1p5000 (2009-01-30 trunk 21885) [i686-linux]
[[[1, 0], :on_regexp_beg, "/"],
[[1, 1], :on_tstring_content, "foo\n"],
[[2, 0], :on_regexp_end, "bar/"]]
%
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0