summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-14 03:30:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-14 03:30:50 +0000
commit9e02550b21e2fa73049284fa8f0b6c5d8a2d5394 (patch)
treeae0a7901d5fc6c2d2ed61429b4484f381d9d9c3a /ruby.c
parentbe3a6b8c403f94715205bcb7ee60515f65c6d482 (diff)
ruby.c: passing block
* ruby.c (rb_f_sub, rb_f_gsub): pass the given block. [ruby-core:47967] [Bug #7157] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby.c b/ruby.c
index 2fbd48f..ba2e5ae 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1186,7 +1186,7 @@ uscore_get(void)
static VALUE
rb_f_sub(int argc, VALUE *argv)
{
- VALUE str = rb_funcall3(uscore_get(), rb_intern("sub"), argc, argv);
+ VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("sub"), argc, argv);
rb_lastline_set(str);
return str;
}
@@ -1205,7 +1205,7 @@ rb_f_sub(int argc, VALUE *argv)
static VALUE
rb_f_gsub(int argc, VALUE *argv)
{
- VALUE str = rb_funcall3(uscore_get(), rb_intern("gsub"), argc, argv);
+ VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("gsub"), argc, argv);
rb_lastline_set(str);
return str;
}
@@ -1223,7 +1223,7 @@ rb_f_gsub(int argc, VALUE *argv)
static VALUE
rb_f_chop(void)
{
- VALUE str = rb_funcall3(uscore_get(), rb_intern("chop"), 0, 0);
+ VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("chop"), 0, 0);
rb_lastline_set(str);
return str;
}
@@ -1243,7 +1243,7 @@ rb_f_chop(void)
static VALUE
rb_f_chomp(int argc, VALUE *argv)
{
- VALUE str = rb_funcall3(uscore_get(), rb_intern("chomp"), argc, argv);
+ VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("chomp"), argc, argv);
rb_lastline_set(str);
return str;
}