aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/cmath.rb6
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bbe7df13dc..30f9a6cc04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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