Bug #4011

Invalid parsing of regexp /abc/min in irb

Added by Heesob Park over 3 years ago. Updated almost 3 years ago.

[ruby-core:32988]
Status:Closed
Priority:Normal
Assignee:Keiju Ishitsuka
Category:lib
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2010-11-01 trunk 29655) [i386-mswin32_90] Backport:

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

History

#1 Updated by Yui NARUSE over 3 years ago

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

=begin

=end

#2 Updated by Yukihiro Matsumoto over 3 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

Also available in: Atom PDF