mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* golf_prelude.rb (Integer): Integer is now enumerable on goruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									7ee205d1d1
								
							
						
					
					
						commit
						b8f8c75579
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -9,3 +9,11 @@ class Object
 | 
			
		|||
    puts "#{a}ello, #{b}orld#{c}"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
class Integer
 | 
			
		||||
  def each(&b)
 | 
			
		||||
    times &b
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  include Enumerable
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue