[macruby-changes] [MacRuby/MacRuby] f42429: String#match will call Regexp#match which was over...
noreply at github.com
noreply at github.com
Wed Apr 13 01:53:34 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: f4242913d483a5e8f529a14c5c9da2929c4b0a30
https://github.com/MacRuby/MacRuby/commit/f4242913d483a5e8f529a14c5c9da2929c4b0a30
Author: Watson <watson1978 at 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
}}}
More information about the macruby-changes
mailing list