summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-02 05:22:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-02 05:22:30 +0000
commitecebbcce1f58687bdcc1028bc8813f004bc22427 (patch)
treeb174dc2ffbf9b9434408606470c14114015e8115 /object.c
parentb6572b687349e70d47616655d1ebaf13bd2279eb (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/trunk@10013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/object.c b/object.c
index 233b9ee131..e3102acc2b 100644
--- a/object.c
+++ b/object.c
@@ -95,45 +95,6 @@ rb_obj_equal(VALUE obj1, VALUE 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(VALUE obj)
-{
- if (SPECIAL_CONST_P(obj)) {
- return LONG2NUM((long)obj);
- }
- return (VALUE)((long)obj|FIXNUM_FLAG);
-}
-
VALUE
rb_class_real(VALUE cl)
{
@@ -2418,9 +2379,6 @@ Init_Object(void)
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, 0);
- rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);