summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-19 07:39:57 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-19 07:39:57 +0000
commit369fe1e8394b494c78d56aedfe6b0b809d7d1c10 (patch)
tree07c13f9e2b892f8891e4a3d77137243ae05caf9e /numeric.c
parent06d812a71ba3c6525a063257512c9ec007c272cf (diff)
1.1b9_22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 9127a0de2b..75ff41da80 100644
--- a/numeric.c
+++ b/numeric.c
@@ -667,7 +667,7 @@ int
num2int(val)
VALUE val;
{
- long num = num2int(val);
+ long num = num2long(val);
if (num < INT_MIN || INT_MAX < num) {
ArgError("integer %d too big to convert to `int'.", num);
@@ -686,6 +686,20 @@ fix2int(val)
}
return (int)num;
}
+#else
+int
+num2int(val)
+ VALUE val;
+{
+ return num2long(val);
+}
+
+int
+fix2int(val)
+ VALUE val;
+{
+ return FIX2INT(val);
+}
#endif
VALUE