[Ironruby-core] Regexp anomalous behavior

John Messerly jomes at microsoft.com
Tue Feb 26 16:56:30 EST 2008


Robert Brotherus:

> Consider following program (test.rb):
>
> puts 'aaabbbaaa'.match('aaa').length
> puts 'aaabbbaaa'.match('x').length
>
> With CRuby, the result or running is:
>
> [08:49:31 ~] ruby test.rb
> 1
> test.rb:2: undefined method `length' for nil:NilClass (NoMethodError)
>
> With IronRuby (revision 76):
>
> [08:37:14 ~] rbx test.rb
> 3
> 0

Sure looks like a bug. I opened a bug for it: http://rubyforge.org/tracker/index.php?func=detail&aid=18407&group_id=4359&atid=16798

- John



More information about the Ironruby-core mailing list