summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/object.c b/object.c
index 41acb4d021..88667e66f9 100644
--- a/object.c
+++ b/object.c
@@ -743,6 +743,14 @@ rb_Integer(val)
return f_integer(Qnil, val);
}
+int
+rb_obj2int(obj)
+ VALUE obj;
+{
+ VALUE i = f_integer(Qnil, obj);
+ return NUM2INT(i);
+}
+
static VALUE
to_flo(val)
VALUE val;