ruby-changes:31419
From: nobu <ko1@a...>
Date: Fri, 1 Nov 2013 16:37:29 +0900 (JST)
Subject: [ruby-changes:31419] nobu:r43498 (trunk): load.c: use local variable
nobu 2013-11-01 16:37:24 +0900 (Fri, 01 Nov 2013) New Revision: 43498 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43498 Log: load.c: use local variable * load.c (rb_load_internal): use local variable th instead of GET_THREAD() for each time. Modified files: trunk/load.c Index: load.c =================================================================== --- load.c (revision 43497) +++ load.c (revision 43498) @@ -607,15 +607,15 @@ rb_load_internal(VALUE fname, int wrap) https://github.com/ruby/ruby/blob/trunk/load.c#L607 th->top_self = self; th->top_wrapper = wrapper; - if (!loaded && !FIXNUM_P(GET_THREAD()->errinfo)) { + if (!loaded && !FIXNUM_P(th->errinfo)) { /* an error on loading don't include INT2FIX(TAG_FATAL) see r35625 */ - rb_exc_raise(GET_THREAD()->errinfo); + rb_exc_raise(th->errinfo); } if (state) { rb_vm_jump_tag_but_local_jump(state); } - if (!NIL_P(GET_THREAD()->errinfo)) { + if (!NIL_P(th->errinfo)) { /* exception during load */ rb_exc_raise(th->errinfo); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/