* variable.c (rb_const_get_0), vm_insnhelper.c (vm_get_ev_const):
avoids infinite self recursion autoload. [ruby-core:21696] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd350b6768
commit
132d0624ec
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 1 05:19:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* variable.c (rb_const_get_0), vm_insnhelper.c (vm_get_ev_const):
|
||||||
|
avoids infinite self recursion autoload. [ruby-core:21696]
|
||||||
|
|
||||||
Sat Jan 31 22:50:38 2009 Tanaka Akira <akr@fsij.org>
|
Sat Jan 31 22:50:38 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* lib/test/unit/assertions.rb (assert_equal): show class in failure
|
* lib/test/unit/assertions.rb (assert_equal): show class in failure
|
||||||
|
@ -59,3 +59,11 @@ assert_equal 'okok', %q{
|
|||||||
[t1.value, t2.value].join
|
[t1.value, t2.value].join
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_finish 5, %q{
|
||||||
|
autoload :ZZZ, File.expand_path(__FILE__)
|
||||||
|
begin
|
||||||
|
ZZZ
|
||||||
|
rescue NameError
|
||||||
|
end
|
||||||
|
}, '[ruby-core:21696]'
|
||||||
|
|
||||||
|
@ -1470,8 +1470,11 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
|
|||||||
tmp = klass;
|
tmp = klass;
|
||||||
retry:
|
retry:
|
||||||
while (RTEST(tmp)) {
|
while (RTEST(tmp)) {
|
||||||
|
VALUE am = 0;
|
||||||
while (RCLASS_IV_TBL(tmp) && st_lookup(RCLASS_IV_TBL(tmp),id,&value)) {
|
while (RCLASS_IV_TBL(tmp) && st_lookup(RCLASS_IV_TBL(tmp),id,&value)) {
|
||||||
if (value == Qundef) {
|
if (value == Qundef) {
|
||||||
|
if (am == tmp) break;
|
||||||
|
am = tmp;
|
||||||
rb_autoload_load(tmp, id);
|
rb_autoload_load(tmp, id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define RUBY_VERSION "1.9.1"
|
#define RUBY_VERSION "1.9.1"
|
||||||
#define RUBY_RELEASE_DATE "2009-01-31"
|
#define RUBY_RELEASE_DATE "2009-02-01"
|
||||||
#define RUBY_PATCHLEVEL 5000
|
#define RUBY_PATCHLEVEL 5000
|
||||||
#define RUBY_BRANCH_NAME "trunk"
|
#define RUBY_BRANCH_NAME "trunk"
|
||||||
|
|
||||||
@ -7,8 +7,8 @@
|
|||||||
#define RUBY_VERSION_MINOR 9
|
#define RUBY_VERSION_MINOR 9
|
||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
#define RUBY_RELEASE_YEAR 2009
|
#define RUBY_RELEASE_YEAR 2009
|
||||||
#define RUBY_RELEASE_MONTH 1
|
#define RUBY_RELEASE_MONTH 2
|
||||||
#define RUBY_RELEASE_DAY 31
|
#define RUBY_RELEASE_DAY 1
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
@ -1082,10 +1082,13 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq,
|
|||||||
cref = cref->nd_next;
|
cref = cref->nd_next;
|
||||||
|
|
||||||
if (!NIL_P(klass)) {
|
if (!NIL_P(klass)) {
|
||||||
|
VALUE am = 0;
|
||||||
search_continue:
|
search_continue:
|
||||||
if (RCLASS_IV_TBL(klass) &&
|
if (RCLASS_IV_TBL(klass) &&
|
||||||
st_lookup(RCLASS_IV_TBL(klass), id, &val)) {
|
st_lookup(RCLASS_IV_TBL(klass), id, &val)) {
|
||||||
if (val == Qundef) {
|
if (val == Qundef) {
|
||||||
|
if (am == klass) break;
|
||||||
|
am = klass;
|
||||||
rb_autoload_load(klass, id);
|
rb_autoload_load(klass, id);
|
||||||
goto search_continue;
|
goto search_continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user