[macruby-changes] [MacRuby/MacRuby] b43448: Regexp.last_match(nth) should return nil if passed...
GitHub
noreply at github.com
Wed Sep 5 14:50:22 PDT 2012
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: b43448aeb6b0f045879592c0fb5d1e60581483c3
https://github.com/MacRuby/MacRuby/commit/b43448aeb6b0f045879592c0fb5d1e60581483c3
Author: Watson <watson1978 at gmail.com>
Date: 2012-09-05 (Wed, 05 Sep 2012)
Changed paths:
M re.c
Log Message:
-----------
Regexp.last_match(nth) should return nil if passed index which is out of matched range
Here is code which expected that Regexp.last_match returns nil:
/(...)/.match("foobarbaz")
Regexp.last_match(4) #=> nil
Regexp.last_match(-3) #=> nil
However, raises an IndexError.
More information about the macruby-changes
mailing list