diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-08 08:54:01 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-08 08:54:01 +0000 |
commit | 320e99d8dda5eb5fc327fcbe20126cdd7fcd059d (patch) | |
tree | b1fc6d8062eebd46c7b8f4fd67f606c9af8f93c2 /eval.c | |
parent | 25be6ce9b5dd2aabad61410068d688250c562189 (diff) |
2000-02-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -7266,21 +7266,21 @@ rb_thread_scope_shared_p() static VALUE rb_thread_yield(arg, th) - int arg; + VALUE arg; thread_t th; { scope_dup(ruby_block->scope); - return rb_yield_0(th->thread, 0, 0, Qfalse); + return rb_yield_0(arg, 0, 0, Qfalse); } static VALUE -rb_thread_start(klass) - VALUE klass; +rb_thread_start(klass, args) + VALUE klass, args; { if (!rb_iterator_p()) { rb_raise(rb_eThreadError, "must be called as iterator"); } - return rb_thread_create_0(rb_thread_yield, 0, klass); + return rb_thread_create_0(rb_thread_yield, args, klass); } static VALUE @@ -7708,9 +7708,9 @@ Init_Thread() rb_eThreadError = rb_define_class("ThreadError", rb_eStandardError); rb_cThread = rb_define_class("Thread", rb_cObject); - rb_define_singleton_method(rb_cThread, "new", rb_thread_start, 0); - rb_define_singleton_method(rb_cThread, "start", rb_thread_start, 0); - rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, 0); + rb_define_singleton_method(rb_cThread, "new", rb_thread_start, -2); + rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2); + rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2); rb_define_singleton_method(rb_cThread, "stop", rb_thread_stop, 0); rb_define_singleton_method(rb_cThread, "kill", rb_thread_s_kill, 1); |