зеркало из https://github.com/github/ruby.git
* bootstraptest/test_gc.rb: added tests based on [ruby-dev:39484]
from wanabe <s.wanabe AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
dd5c77f0c9
Коммит
9bcccca47a
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 16 18:42:18 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* bootstraptest/test_gc.rb: added tests based on [ruby-dev:39484]
|
||||
from wanabe <s.wanabe AT gmail.com>.
|
||||
|
||||
Fri Oct 16 16:09:01 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_spawn): `\'' is also quote character.
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
assert_normal_exit %q{
|
||||
a = []
|
||||
ms = "a".."k"
|
||||
("A".."Z").each do |mod|
|
||||
mod = eval("module #{mod}; self; end")
|
||||
ms.each do |meth|
|
||||
iseq = RubyVM::InstructionSequence.compile("module #{mod}; def #{meth}; end; end")
|
||||
GC.stress = true
|
||||
iseq.eval
|
||||
GC.stress = false
|
||||
end
|
||||
o = Object.new.extend(mod)
|
||||
ms.each do |meth|
|
||||
o.send(meth)
|
||||
end
|
||||
end
|
||||
}, '[ruby-dev:39453]'
|
||||
|
||||
assert_normal_exit %q{
|
||||
a = []
|
||||
ms = "a".."k"
|
||||
("A".."Z").each do |mod|
|
||||
mod = eval("module #{mod}; self; end")
|
||||
ms.each do |meth|
|
||||
GC.stress = true
|
||||
mod.module_eval {define_method(meth) {}}
|
||||
GC.stress = false
|
||||
end
|
||||
o = Object.new.extend(mod)
|
||||
ms.each do |meth|
|
||||
o.send(meth)
|
||||
end
|
||||
end
|
||||
}, '[ruby-dev:39453]'
|
Загрузка…
Ссылка в новой задаче