From 8b27d153d22a266d77f3bdfa98ff60a1bfa53322 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 16 Apr 2009 14:17:14 +0000 Subject: * class.c (rb_define_method_id): use rb_define_notimplement_method_id if rb_f_notimplement is given. (rb_define_protected_method): ditto. (rb_define_private_method): ditto. (rb_define_method): use rb_define_method_id. * include/ruby/intern.h (rb_f_notimplement): declared. (rb_define_notimplement_method_id): declared. * proc.c (method_inspect): show not-implemented. * vm_method.c (notimplement_body): new variable. (rb_notimplement_body_p): new function. (rb_method_boundp): return false if not implemented. (rb_f_notimplement): new function. (rb_define_notimplement_method_id): new function. * process.c (rb_f_fork): use rb_f_notimplement if not implemented. * file.c (rb_file_s_lchmod): use rb_f_notimplement if not implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index f86ee199a6..db9158e680 100644 --- a/process.c +++ b/process.c @@ -2601,10 +2601,10 @@ rb_fork(int *status, int (*chfunc)(void*), void *charg, VALUE fds) * fork doesn't copy other threads. */ +#if defined(HAVE_FORK) && !defined(CANNOT_FORK_WITH_PTHREAD) static VALUE rb_f_fork(VALUE obj) { -#if defined(HAVE_FORK) && !defined(CANNOT_FORK_WITH_PTHREAD) rb_pid_t pid; rb_secure(2); @@ -2630,11 +2630,10 @@ rb_f_fork(VALUE obj) default: return PIDT2NUM(pid); } +} #else - rb_notimplement(); +#define rb_f_fork rb_f_notimplement #endif -} - /* * call-seq: -- cgit v1.2.3