 53a2558473
			
		
	
	
		53a2558473
		
	
	
	
	
		
			
			Previously, with nested arrays, the Symbol#to_proc would iterate over the first item in the nested array instead of the array itself, e.g.: [[1,2], [3,4]].map(&:first) #=> NoMethodError: undefined method `first' for 1:Fixnum
		
			
				
	
	
		
			6 lines
		
	
	
		
			120 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
		
			120 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| class Symbol
 | |
|   def to_proc
 | |
|     proc { |*args| args.shift.send(self, *args) }
 | |
|   end unless method_defined?(:to_proc)
 | |
| end
 |