summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-26 00:38:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-26 00:38:44 +0000
commitb664645ddc5dc0d1dceb0b0f4a9710f0ce5a0c29 (patch)
tree2fde9c8a27be9bdc53e5ac3658c226b35ac3e334 /eval.c
parent67c8ca36f22e1023eeaa1de7221bdaf294ef6bde (diff)
* eval.c (rb_proc_new): make Proc from C function. [new]
* intern.h (rb_proc_new): prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 48f844c506..b72b70fdd8 100644
--- a/eval.c
+++ b/eval.c
@@ -6998,6 +6998,14 @@ umcall(args, method)
return umethod_call(0, 0, method);
}
+VALUE
+rb_proc_new(func, val)
+ VALUE (*func)(ANYARGS); /* VALUE yieldarg[, VALUE procarg] */
+ VALUE val;
+{
+ return rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
+}
+
static VALUE
method_proc(method)
VALUE method;