mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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:
		
							parent
							
								
									dd5c77f0c9
								
							
						
					
					
						commit
						9bcccca47a
					
				
					 2 changed files with 39 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										34
									
								
								bootstraptest/test_gc.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								bootstraptest/test_gc.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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]'
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue