mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	 9bcccca47a
			
		
	
	
		9bcccca47a
		
	
	
	
	
		
			
			from wanabe <s.wanabe AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			701 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			701 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| 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]'
 |