Feature #12745 ยป ruby_string_sub_matchdata.diff
| string.c | ||
|---|---|---|
|
p = RSTRING_PTR(str); len = RSTRING_LEN(str);
|
||
|
if (iter) {
|
||
|
match0 = rb_funcallv(pat, rb_intern("match"), 1, &str);
|
||
|
repl = rb_obj_as_string(rb_yield(match0));
|
||
|
}
|
||
|
else {
|
||
| tool/rbinstall.rb | ||
|---|---|---|
|
postbatch << ">,\n}\n"
|
||
|
postbatch.gsub!(/(?=\n)/, ' #')
|
||
|
install_recursive(File.join(srcdir, "bin"), bindir, :maxdepth => 1) do |src, cmd|
|
||
|
cmd = cmd.sub(/[^\/]*\z/m) {|n| RbConfig.expand(trans[n])}
|
||
|
cmd = cmd.sub(/[^\/]*\z/m) {|n| RbConfig.expand(trans[n.to_s])}
|
||
|
shebang, body = open(src, "rb") do |f|
|
||
|
next f.gets, f.read
|
||