Project

General

Profile

Feature #12745 ยป ruby_string_sub_matchdata.diff

herwin (Herwin W), 09/09/2016 06:32 PM

View differences:

string.c
4663 4663
	    p = RSTRING_PTR(str); len = RSTRING_LEN(str);
4664 4664

  
4665 4665
            if (iter) {
4666
                match0 = rb_funcallv(pat, rb_intern("match"), 1, &str);
4666 4667
                repl = rb_obj_as_string(rb_yield(match0));
4667 4668
            }
4668 4669
            else {
tool/rbinstall.rb
474 474
  postbatch << ">,\n}\n"
475 475
  postbatch.gsub!(/(?=\n)/, ' #')
476 476
  install_recursive(File.join(srcdir, "bin"), bindir, :maxdepth => 1) do |src, cmd|
477
    cmd = cmd.sub(/[^\/]*\z/m) {|n| RbConfig.expand(trans[n])}
477
    cmd = cmd.sub(/[^\/]*\z/m) {|n| RbConfig.expand(trans[n.to_s])}
478 478

  
479 479
    shebang, body = open(src, "rb") do |f|
480 480
      next f.gets, f.read