Project

General

Profile

Actions

Bug #4011

closed

Invalid parsing of regexp /abc/min in irb

Added by phasis68 (Heesob Park) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-11-01 trunk 29655) [i386-mswin32_90]
Backport:
[ruby-core:32988]

Description

=begin
When Regexp option is "min" or "xin", irb cannot detect end of statement.

C:\work>irb
irb(main):001:0> a = /abc/min
irb(main):002:0*

Here is a patch
--- ruby-lex.rb 2010-11-01 17:00:46.000000000 +0900
+++ ruby-lex.rb.new 2010-11-01 17:02:00.000000000 +0900
@@ -1068,7 +1068,7 @@
end
end
if @ltype == "/"

  •   if peek(0) =~ /i|m|x|o|e|s|u|n/
    
  •   while peek(0) =~ /i|m|x|o|e|s|u|n/
        getc
      end
     end
    

=end

Actions #1

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to keiju (Keiju Ishitsuka)
  • Target version changed from 2.0.0 to 1.9.3

=begin

=end

Actions #2

Updated by matz (Yukihiro Matsumoto) over 13 years ago

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

=begin
This issue was solved with changeset r29674.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0