Create a gist now

Instantly share code, notes, and snippets.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment