summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-02 10:46:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-02 10:46:17 +0000
commit6828bbeae08b5d8a328c403c98d7fdff471858c5 (patch)
tree4d400e864b04e6d08ae0249b7e1e75b1b82bb7b1 /object.c
parent2b3243d7fae2b245211bee410e24bc40245877ca (diff)
* gc.c: align VALUE with sizeof(RVALUE) globally.
(is_pointer_to_heap): check alignment out of loop. (id2ref): avoid collision between symbols and objects. (rb_obj_id): ditto. moved from object.c. [ruby-talk:178364] [ruby-core:7401] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/object.c b/object.c
index d1a57bc73a..61492ef674 100644
--- a/object.c
+++ b/object.c
@@ -98,46 +98,6 @@ rb_obj_equal(obj1, obj2)
return Qfalse;
}
-
-/*
- * Document-method: __id__
- * Document-method: object_id
- *
- * call-seq:
- * obj.__id__ => fixnum
- * obj.object_id => fixnum
- *
- * Returns an integer identifier for <i>obj</i>. The same number will
- * be returned on all calls to <code>id</code> for a given object, and
- * no two active objects will share an id.
- * <code>Object#object_id</code> is a different concept from the
- * <code>:name</code> notation, which returns the symbol id of
- * <code>name</code>. Replaces the deprecated <code>Object#id</code>.
- */
-
-
-
-/*
- * call-seq:
- * obj.hash => fixnum
- *
- * Generates a <code>Fixnum</code> hash value for this object. This
- * function must have the property that <code>a.eql?(b)</code> implies
- * <code>a.hash == b.hash</code>. The hash value is used by class
- * <code>Hash</code>. Any hash value that exceeds the capacity of a
- * <code>Fixnum</code> will be truncated before being used.
- */
-
-VALUE
-rb_obj_id(obj)
- VALUE obj;
-{
- if (SPECIAL_CONST_P(obj)) {
- return LONG2NUM((long)obj);
- }
- return (VALUE)((long)obj|FIXNUM_FLAG);
-}
-
/*
* call-seq:
* obj.id => fixnum
@@ -2614,10 +2574,7 @@ Init_Object()
rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
- rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_define_method(rb_mKernel, "id", rb_obj_id_obsolete, 0);
- rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
- rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
rb_define_method(rb_mKernel, "type", rb_obj_type, 0);
rb_define_method(rb_mKernel, "class", rb_obj_class, 0);