[MacRuby/MacRuby] f04df7: fix a bug of Regexp#match. Regexp#match(str, pos) ...
23 Jun
2011
23 Jun
'11
3:47 a.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: f04df77691d7f2e3bbd5005183d34c9ed972274c https://github.com/MacRuby/MacRuby/commit/f04df77691d7f2e3bbd5005183d34c9ed9... Author: Watson <watson1978@gmail.com> Date: 2011-06-22 (Wed, 22 Jun 2011) Changed paths: M re.h Log Message: ----------- fix a bug of Regexp#match. Regexp#match(str, pos) was broken when was passed a pos. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = 'This is an example string' reg = Regexp.new(/\w+/) assert_equal("is", reg.match(str, 4)[0]) assert_equal("an", reg.match(str, 8)[0]) assert_equal("g", reg.match(str, -1)[0]) puts :ok }}}
5252
Age (days ago)
5252
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@github.com