Project

General

Profile

Bug #3681

Character class abbreviations, + repetition notation and group backreferences issue in Regexp

Added by dre3k (Andrei Kulakov) almost 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-08-17 trunk 29020) [x86_64-freebsd8.1]
Backport:
[ruby-core:31677]

Description

=begin
There seems to be a bug in Ruby 1.9.2 rc2 regarding Regular Expression

/([A-Z][a-z]+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w+){2}/ =~ 'TestString' # => nil #should be 0
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => nil #should be 0
/([A-Z]\w{1,10}){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,}){2}/ =~ 'TestString' # => nil #should be 0

Ruby 1.9.1 p429 yields correct result

/([A-Z][a-z]+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,10}){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,}){2}/ =~ 'TestString' # => 0 #correct
=end

Associated revisions

Revision ce5827c6
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

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

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision 29023
Added by naruse (Yui NARUSE) almost 9 years ago

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

Revision f7f765ee
Added by yugui (Yuki Sonoda) almost 9 years ago

merges r29023 from trunk into ruby_1_9_2.

  • regcomp.c: revert r26701; it introduces Bug #3681. [ruby-core:31677]

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

History

#1

Updated by naruse (Yui NARUSE) almost 9 years ago

  • Assignee set to naruse (Yui NARUSE)
  • ruby -v set to ruby 1.9.3dev (2010-08-17 trunk 29020) [x86_64-freebsd8.1]

=begin
I can reproduce this, I'll fix it.
=end

#2

Updated by naruse (Yui NARUSE) almost 9 years ago

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

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

=end

Also available in: Atom PDF