[MacRuby/MacRuby] f42429: String#match will call Regexp#match which was over...
13 Apr
2011
13 Apr
'11
8:53 a.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: f4242913d483a5e8f529a14c5c9da2929c4b0a30 https://github.com/MacRuby/MacRuby/commit/f4242913d483a5e8f529a14c5c9da2929c... Author: Watson <watson1978@gmail.com> Date: 2011-04-13 (Wed, 13 Apr 2011) Changed paths: M string.c Log Message: ----------- String#match will call Regexp#match which was overridden. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions reg = /foo/ def reg.match(x, y); "hello " + y; end assert_equal("hello bar", "foo".match(reg, "bar")) "foo".match(reg, "baz") {|x| assert_equal("hello baz", x) } assert_equal("bar", "foobarbaz".match(/bar/).to_s) puts :ok }}}
5323
Age (days ago)
5323
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@github.com