aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-09 21:18:42 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-09 21:18:42 +0000
commit9fd45a37ccbbb284906f1c276b44c7426c1efd13 (patch)
tree01224db43c9d7700921827e2029d79be6c318dae /variable.c
parentb3dbaa5874987422d249f22b68be1c3bb39a9f45 (diff)
downloadruby-9fd45a37ccbbb284906f1c276b44c7426c1efd13.tar.gz
variable.c (rb_autoload_load): allow recursive calls
* variable.c (rb_autoload_load): allow recursive calls [ruby-core:71345] [Bug #11658] * test/ruby/test_autoload.rb (test_autoload_while_autoloading): new test by: Hiroshi Shirosaki <h.shirosaki@gmail.com> [ruby-core:71390] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/variable.c b/variable.c
index ec6924ad2f..c8264b1fe9 100644
--- a/variable.c
+++ b/variable.c
@@ -2179,6 +2179,9 @@ rb_autoload_load(VALUE mod, ID id)
*/
list_head_init(&state.waitq.head);
}
+ else if (state.thread == ele->state->thread) {
+ return Qfalse;
+ }
else {
list_add_tail(&ele->state->waitq.head, &state.waitq.node);
/*