From: JOSEPHJONES3247 Date: 2011-07-18T02:50:43+09:00 Subject: [ruby-core:38145] Re: [Ruby 1.9 - Bug #5038][Rejected] Ruby 1.9.2 stops on some Regular Expressions ------=_Part_729863_1781383591.1310925036024 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit I put #{} into your Issue and got nil n = 50 st = "Phone" + " "#{*n} + "Fax" st.match(/(.+\s)*email/i) ----- Original Message ----- From: "Yui NARUSE" To: ruby-core@ruby-lang.org Sent: Sunday, July 17, 2011 10:47:13 AM Subject: [ruby-core:38142] [Ruby 1.9 - Bug #5038][Rejected] Ruby 1.9.2 stops on some Regular Expressions Issue #5038 has been updated by Yui NARUSE. Status changed from Open to Rejected It is limitation of the spec which uses NFA regexp engine. see also http://swtch.com/~rsc/regexp/regexp1.html ---------------------------------------- Bug #5038: Ruby 1.9.2 stops on some Regular Expressions http://redmine.ruby-lang.org/issues/5038 Author: Bob Ambartsumov Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] # Code to reproduce: n = 50 st = "Phone" + " "*n + "Fax" st.match(/(.+\s)*email/i) nil is expected The execution stops on match, or enters some endless loop. CPU load is high. Works as expected when not using /i (case-insensitive) Works as expected on smaller n (<20) Takes about 5 seconds to execute on n=30 -- http://redmine.ruby-lang.org ------=_Part_729863_1781383591.1310925036024 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Arial; font-size: 12pt; color: #000000'>I put #{}= into your Issue and got nil

n =3D 50
st =3D "Phone" + " "#{*n} += "Fax"
st.match(/(.+\s)*email/i)


From: "Y= ui NARUSE" <naruse@airemix.jp>
To: ruby-core@ruby-lang.org<= br>Sent: Sunday, July 17, 2011 10:47:13 AM
Subject: [ruby-= core:38142] [Ruby 1.9 - Bug #5038][Rejected] Ruby 1.9.2 stops on some Regul= ar Expressions


Issue #5038 has been updated by Yui NARUSE.
Status changed from Open to Rejected

It is limitation of the spec = which uses NFA regexp engine.
see also http://swtch.com/~rsc/regexp/rege= xp1.html
----------------------------------------
Bug #5038: Ruby 1.9= .2 stops on some Regular Expressions
http://redmine.ruby-lang.org/issues= /5038

Author: Bob Ambartsumov
Status: Rejected
Priority: Norma= l
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.2p29= 0 (2011-07-09 revision 32553) [i686-linux]


# Code to reproduce:<= br>n =3D 50
st =3D "Phone" + " "*n + "Fax"
st.match(/(.+\s)*email/i)<= br>

nil is expected
The execution stops on match, or enters some = endless loop. CPU load is high.
Works as expected when not using /i (ca= se-insensitive)
Works as expected on smaller n (<20)
Takes about 5= seconds to execute on n=3D30


--
http://redmine.ruby-lang.or= g

------=_Part_729863_1781383591.1310925036024--