public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
module Kernel
alias_method :puts_without_check, :puts
def puts(*args)
args.each do |arg|
raise "puts called, check the backtrace for the source" if arg.to_s =~ /Class:/
end
puts_without_check(*args)
end
 
alias_method :print_without_check, :print
def print(*args)
args.each do |arg|
raise "puts called, check the backtrace for the source" if arg.to_s =~ /Class:/
end
print_without_check(*args)
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.