Created
February 23, 2011 06:09
-
-
Save pmarreck/840094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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