Created
September 22, 2014 08:25
-
-
Save lukas2/c283fddad5d6883efee6 to your computer and use it in GitHub Desktop.
Revisions
-
lukas2 created this gist
Sep 22, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ class Fixnum alias_method :_div, :/ def /(a) if a == 0 0 else _div a end end end puts "9 / 2 = %f" % (9 / 2).to_f puts "9 / 0 = %f" % (9 / 0).to_f