Skip to content

Instantly share code, notes, and snippets.

@mguterl
Created January 31, 2011 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mguterl/804506 to your computer and use it in GitHub Desktop.
Save mguterl/804506 to your computer and use it in GitHub Desktop.
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