Skip to content

Instantly share code, notes, and snippets.

@pmarreck
Created February 23, 2011 06:09
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 pmarreck/840094 to your computer and use it in GitHub Desktop.
Save pmarreck/840094 to your computer and use it in GitHub Desktop.
module Mathhax
def /(o)
if o==0
puts "I'm sorry, #{`hostname`.chomp}, I'm afraid I can't do that"
else
super
end
end
end
class Fixnum
include Mathhax
end
class Float
include Mathhax
end
45/0
345.0/0.0
# doesn't catch it. why?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment