summaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 16:32:49 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 16:32:49 +0000
commitc68490037a060b14bc9e7bb3d5f86f58f9e44686 (patch)
tree77fff7fabeb8389f4921f43b76cb270f8c539d24 /variable.c
parent9ddc0996e34bac6fbc8b8bdc8e116d40c2a2d9be (diff)
downloadruby-c68490037a060b14bc9e7bb3d5f86f58f9e44686.tar.gz
ruby-c68490037a060b14bc9e7bb3d5f86f58f9e44686.tar.xz
ruby-c68490037a060b14bc9e7bb3d5f86f58f9e44686.zip
merges r21536 from trunk into ruby_1_9_1.
* vm.c (rb_vm_inc_const_missing_count, ruby_vm_const_missing_count): added. * vm_insnhelper.h: ditto. * variable.c (rb_const_get_0), insns.def: Constants should not be cached if const_missing is called. [ruby-core:21059] [Bug #967] * bootstraptest/test_class.rb: add a test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 283db9926..0cc87d7fd 100644
--- a/variable.c
+++ b/variable.c
@@ -17,6 +17,8 @@
#include "node.h"
void rb_vm_change_state(void);
+void rb_vm_inc_const_missing_count(void);
+
st_table *rb_global_tbl;
st_table *rb_class_tbl;
static ID autoload, classpath, tmp_classpath;
@@ -1488,7 +1490,9 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
goto retry;
}
- return const_missing(klass, id);
+ value = const_missing(klass, id);
+ rb_vm_inc_const_missing_count();
+ return value;
}
VALUE