Remove unnecessary array allocations
These classes are never instantiated with arguments, so we can get rid of the unnecessary array splatting.
This commit is contained in:
		
							parent
							
								
									a412b49c2c
								
							
						
					
					
						commit
						dc79f803b1
					
				@ -1,8 +1,8 @@
 | 
			
		||||
class Dependencies
 | 
			
		||||
  include Enumerable
 | 
			
		||||
 | 
			
		||||
  def initialize(*args)
 | 
			
		||||
    @deps = Array.new(*args)
 | 
			
		||||
  def initialize
 | 
			
		||||
    @deps = []
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def each(*args, &block)
 | 
			
		||||
@ -60,8 +60,8 @@ end
 | 
			
		||||
class Requirements
 | 
			
		||||
  include Enumerable
 | 
			
		||||
 | 
			
		||||
  def initialize(*args)
 | 
			
		||||
    @reqs = Set.new(*args)
 | 
			
		||||
  def initialize
 | 
			
		||||
    @reqs = Set.new
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def each(*args, &block)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user