diff --git a/ChangeLog b/ChangeLog index 9eacedbf82..47f53d6cea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 26 09:35:47 2002 Nobuyoshi Nakada + + * 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 * eval.c (proc_to_proc): return self. [new] 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; diff --git a/intern.h b/intern.h index 733f1c1029..86c3c24477 100644 --- a/intern.h +++ b/intern.h @@ -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)); diff --git a/version.h b/version.h index 7874029acf..d1e3e71633 100644 --- a/version.h +++ b/version.h @@ -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