summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-16 09:42:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-16 09:42:20 +0000
commit9bcccca47a8a8800a1ac09eeb35dfe5135ca079f (patch)
treeb6d2daa71ba2814356a7cf98d1d0f7e46be8cb11
parentdd5c77f0c97ed15536302f8b3c0b230d5988682b (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--bootstraptest/test_gc.rb34
2 files changed, 39 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a0cab7ec5e..510c105b89f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/bootstraptest/test_gc.rb b/bootstraptest/test_gc.rb
new file mode 100644
index 00000000000..eb68c9845e3
--- /dev/null
+++ b/bootstraptest/test_gc.rb
@@ -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]'