puts_columns only has to be defined inside module Kernel.
				
					
				
			This commit is contained in:
		
							parent
							
								
									6e10f91371
								
							
						
					
					
						commit
						4bfeaaf212
					
				@ -1,10 +1,10 @@
 | 
			
		||||
require "utils/tty"
 | 
			
		||||
 | 
			
		||||
class IO
 | 
			
		||||
module Kernel
 | 
			
		||||
  def puts_columns(*objects, gap_size: 2)
 | 
			
		||||
    objects.flatten!
 | 
			
		||||
 | 
			
		||||
    if objects.empty? || !tty?
 | 
			
		||||
    if objects.empty? || (respond_to?(:tty?) && !tty?)
 | 
			
		||||
      puts(*objects)
 | 
			
		||||
      return
 | 
			
		||||
    end
 | 
			
		||||
@ -41,9 +41,3 @@ class IO
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
module Kernel
 | 
			
		||||
  def puts_columns(*objects)
 | 
			
		||||
    $stdout.puts_columns(*objects)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user