Project

General

Profile

Actions

Bug #5038

closed

Ruby 1.9.2 stops on some Regular Expressions

Added by docolabs (Bob Ambartsumov) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
Backport:
[ruby-core:38137]

Description

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0