diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-31 08:28:19 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-31 08:28:19 +0000 |
commit | cfe8ed5cbc763a3abcfc19ce10619836aeff7682 (patch) | |
tree | 73e1df59ad171cb0b3586efd97f20a9f4c6e1cb5 /vm_insnhelper.c | |
parent | f653519cbbf9344102502830f6e478ae3d293810 (diff) | |
download | ruby-cfe8ed5cbc763a3abcfc19ce10619836aeff7682.tar.gz |
* Re-apply r33078, thread-safe autoload which is reverted at r33093.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 9410963d5c..e79d4a092d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1178,7 +1178,7 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq, cref = cref->nd_next; if (!NIL_P(klass)) { - VALUE am = 0; + VALUE av, am = 0; st_data_t data; search_continue: if (RCLASS_CONST_TBL(klass) && @@ -1188,6 +1188,7 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq, if (am == klass) break; am = klass; if (is_defined) return 1; + if (rb_autoloading_value(klass, id, &av)) return av; rb_autoload_load(klass, id); goto search_continue; } |