ruby-changes:20008
From: keiju <ko1@a...>
Date: Mon, 13 Jun 2011 19:53:35 +0900 (JST)
Subject: [ruby-changes:20008] keiju:r32055 (trunk): * lib/cmath.rb: add new methd Object#real?. fix #3137
keiju 2011-06-13 19:48:12 +0900 (Mon, 13 Jun 2011) New Revision: 32055 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32055 Log: * lib/cmath.rb: add new methd Object#real?. fix #3137 Modified files: trunk/ChangeLog trunk/lib/cmath.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32054) +++ ChangeLog (revision 32055) @@ -1,3 +1,7 @@ +Mon Jun 13 19:46:21 2011 Keiju Ishitsuka <keiju@i...> + + * lib/cmath.rb: add new methd Object#real?. fix #3137 + Mon Jun 13 18:52:00 2011 Kenta Murata <mrkn@m...> * ext/bigdecimal/bigdecimal.c (is_kind_of_BigDecimal): new function to Index: lib/cmath.rb =================================================================== --- lib/cmath.rb (revision 32054) +++ lib/cmath.rb (revision 32055) @@ -314,3 +314,9 @@ module_function :lgamma end + +class Object + def real? + raise TypeError, "Numeric Number required" + end +end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/