From 0f6794cb2329d9abca759a2db2717ea55ba3addf Mon Sep 17 00:00:00 2001 From: keiju Date: Mon, 13 Jun 2011 10:48:12 +0000 Subject: * lib/cmath.rb: add new methd Object#real?. fix #3137 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cmath.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/cmath.rb b/lib/cmath.rb index 4751f6c4a1..e21f9d8947 100644 --- a/lib/cmath.rb +++ b/lib/cmath.rb @@ -314,3 +314,9 @@ module CMath module_function :lgamma end + +class Object + def real? + raise TypeError, "Numeric Number required" + end +end -- cgit v1.2.3