summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 14:52:33 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 14:52:33 +0000
commit8767705eb238d7c2391c5cce3c2945db99fc0c24 (patch)
tree202a7fd3734af7ed64b1dd3138752bd2a82de03e /numeric.c
parentb78c7fa106da832f4fe7d2ad8c1f25410fa6b538 (diff)
merge revision(s) 39376: [Backport #7903]
* random.c (rb_random_ulong_limited): fix error message for negative value. [ruby-dev:47061] [Bug #7903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index a512ba8991..fe85d6cc31 100644
--- a/numeric.c
+++ b/numeric.c
@@ -185,6 +185,12 @@ negative_int_p(VALUE num)
return RTEST(rb_funcall(num, mid, 1, INT2FIX(0)));
}
+int
+rb_num_negative_p(VALUE num)
+{
+ return negative_int_p(num);
+}
+
/*
* call-seq:
* num.coerce(numeric) -> array