On 02/28/2016 12:22 PM, Eric Wong wrote:
> Keep in mind the equivalent Perl terminates just fine:

Yes. But,

> So I prefer we acknowledge cases like these as bugs to at least
> encourage someone to fix them.

Ruby's (and Perl's) RE grammar is known to be NP complete.  Fixing this ``issue'' ultimately requires a proof of P=NP.  I don't think it'll happen in a near future.

I guess Perl's RE engine can happen to handle this specific /\(a+( ?a*)*\)/ case, maybe due to their optimization.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>