summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 03:46:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 03:46:47 +0000
commit3f2ce6373f7902e02c559876fb7255b5e36aaa64 (patch)
tree685108cad30bda565d1bd67f803546686f077691 /numeric.c
parente51a9b49f1ded288ee00732f0d7d4af01764a793 (diff)
random.c: fix error message
* 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/trunk@39376 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 3216b79ffa..5c629d79c9 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