aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-28 15:58:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-28 15:58:32 +0000
commit962bcf1394762f297331f0a5a79c8fc3cc55ed10 (patch)
treed82f07a115b775135a5399260bce12db80469899 /eval.c
parent2a05d8c7fb304a24f716458104128b830d435322 (diff)
downloadruby-962bcf1394762f297331f0a5a79c8fc3cc55ed10.tar.gz
* eval.c (ev_const_get), variable.c (rb_const_get_0): retry only when
autoload succeeded. * variable.c (rb_autoload_load): now return true if autoload succeeded. fixed: [ruby-dev:27331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index daaf635d2d..06a1fa1e5a 100644
--- a/eval.c
+++ b/eval.c
@@ -1795,7 +1795,7 @@ ev_const_get(NODE *cref, ID id, VALUE self)
if (NIL_P(klass)) return rb_const_get(CLASS_OF(self), id);
while (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
if (result == Qundef) {
- rb_autoload_load(klass, id);
+ if (!RTEST(rb_autoload_load(klass, id))) break;
continue;
}
return result;