aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
authorkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 10:48:12 +0000
committerkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 10:48:12 +0000
commit0f6794cb2329d9abca759a2db2717ea55ba3addf (patch)
treefbaa8fb9ca03d40bfaed8706c4ce402ff76218e6 /lib/cmath.rb
parent2ba3909c0a55672f541d8be94168ba41e7211ecb (diff)
downloadruby-0f6794cb2329d9abca759a2db2717ea55ba3addf.tar.gz
* 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
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb6
1 files changed, 6 insertions, 0 deletions
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