diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 16:32:49 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 16:32:49 +0000 |
| commit | c68490037a060b14bc9e7bb3d5f86f58f9e44686 (patch) | |
| tree | 77fff7fabeb8389f4921f43b76cb270f8c539d24 /vm.c | |
| parent | 9ddc0996e34bac6fbc8b8bdc8e116d40c2a2d9be (diff) | |
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 'vm.c')
| -rw-r--r-- | vm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -34,6 +34,8 @@ VALUE rb_cEnv; VALUE rb_mRubyVMFrozenCore; VALUE ruby_vm_global_state_version = 1; +VALUE ruby_vm_const_missing_count = 0; + char ruby_vm_redefined_flag[BOP_LAST_]; rb_thread_t *ruby_current_thread = 0; @@ -49,6 +51,12 @@ rb_vm_change_state(void) INC_VM_STATE_VERSION(); } +void +rb_vm_inc_const_missing_count(void) +{ + ruby_vm_const_missing_count +=1; +} + /* control stack frame */ static inline VALUE |
