diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 15:31:43 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 15:31:43 +0000 |
commit | a3a45fafa3d7df3ea1a406847abef1b4aaa07bf1 (patch) | |
tree | e07f00ae40ad19dc6d65516253d2ed6cc85a3e48 /bootstraptest/test_class.rb | |
parent | e39bd71126c6834637d115995a3602c56302b224 (diff) | |
download | ruby-a3a45fafa3d7df3ea1a406847abef1b4aaa07bf1.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_class.rb')
-rw-r--r-- | bootstraptest/test_class.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstraptest/test_class.rb b/bootstraptest/test_class.rb index 1c49b83037..ad2844106f 100644 --- a/bootstraptest/test_class.rb +++ b/bootstraptest/test_class.rb @@ -130,3 +130,17 @@ assert_equal "ok", %q{ :ok end }, '[ruby-core:14378]' + +assert_equal '3', %q{ + $i = 0 + class C + def self.const_missing *args + $i+=1 + end + end + + 3.times{ + C::FOO + } + $i +} |