From 4dd5679cbbac110f741a16ad7ca49e985f9fae82 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 20 Apr 1998 06:20:35 +0000 Subject: 1.1b9_12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'object.c') 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; -- cgit v1.2.3