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 | |
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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/cmath.rb | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Mon Jun 13 19:46:21 2011 Keiju Ishitsuka <keiju@ishitsuka.com> + + * lib/cmath.rb: add new methd Object#real?. fix #3137 + Mon Jun 13 18:52:00 2011 Kenta Murata <mrkn@mrkn.jp> * ext/bigdecimal/bigdecimal.c (is_kind_of_BigDecimal): new function to 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 |