diff options
author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-13 10:48:12 +0000 |
---|---|---|
committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-13 10:48:12 +0000 |
commit | 0f6794cb2329d9abca759a2db2717ea55ba3addf (patch) | |
tree | fbaa8fb9ca03d40bfaed8706c4ce402ff76218e6 /lib/cmath.rb | |
parent | 2ba3909c0a55672f541d8be94168ba41e7211ecb (diff) | |
download | ruby-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.rb | 6 |
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 |