1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2002-04-26 00:38:44 +00:00
parent 67c8ca36f2
commit b664645ddc
4 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Fri Apr 26 09:35:47 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (rb_proc_new): make Proc from C function. [new]
* intern.h (rb_proc_new): prototype.
Wed Apr 24 14:56:46 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (proc_to_proc): return self. [new]

8
eval.c
View file

@ -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;

View file

@ -164,6 +164,7 @@ VALUE rb_f_require _((VALUE, VALUE));
void rb_obj_call_init _((VALUE, int, VALUE*));
VALUE rb_class_new_instance _((int, VALUE*, VALUE));
VALUE rb_f_lambda _((void));
VALUE rb_proc_new _((VALUE (*)(.../* VALUE yieldarg[, VALUE procarg] */), VALUE));
VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
void rb_set_end_proc _((void (*)(VALUE), VALUE));
void rb_mark_end_proc _((void));

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.2"
#define RUBY_RELEASE_DATE "2002-04-25"
#define RUBY_RELEASE_DATE "2002-04-26"
#define RUBY_VERSION_CODE 172
#define RUBY_RELEASE_CODE 20020425
#define RUBY_RELEASE_CODE 20020426