mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c65dc7ae6
commit
c923eaf176
6 changed files with 42 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue