summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-18 06:59:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-18 06:59:04 +0000
commitbfb47068b0a888aa82ad027aadb36828ac396683 (patch)
tree32915dbe65d750121bbde9fffb148ec19eccd945 /object.c
parentab6963043df202bde77d67dfabff41cc3e7c11c8 (diff)
* eval.c: remove specialized version of rb_Array(). use simple
one defined in object.c. * object.c (Init_Object): remove Kernel#to_a. * enum.c (enum_zip): use "to_a" instead of "to_ary". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/object.c b/object.c
index bbc9ec5390..0e7801fe77 100644
--- a/object.c
+++ b/object.c
@@ -178,7 +178,6 @@ rb_obj_type(obj)
return rb_class_real(CLASS_OF(obj));
}
-
/*
* call-seq:
* obj.class => class
@@ -318,30 +317,6 @@ rb_obj_init_copy(obj, orig)
/*
* call-seq:
- * obj.to_a -> anArray
- *
- * Returns an array representation of <i>obj</i>. For objects of class
- * <code>Object</code> and others that don't explicitly override the
- * method, the return value is an array containing <code>self</code>.
- * However, this latter behavior will soon be obsolete.
- *
- * self.to_a #=> -:1: warning: default `to_a' will be obsolete
- * "hello".to_a #=> ["hello"]
- * Time.new.to_a #=> [39, 54, 8, 9, 4, 2003, 3, 99, true, "CDT"]
- */
-
-
-static VALUE
-rb_any_to_a(obj)
- VALUE obj;
-{
- rb_warn("default `to_a' will be obsolete");
- return rb_ary_new3(1, obj);
-}
-
-
-/*
- * call-seq:
* obj.to_s => string
*
* Returns a string representing <i>obj</i>. The default
@@ -2322,7 +2297,6 @@ rb_f_string(obj, arg)
return rb_String(arg);
}
-#if 0
VALUE
rb_Array(val)
VALUE val;
@@ -2345,7 +2319,6 @@ rb_Array(val)
}
return tmp;
}
-#endif
/*
* call-seq:
@@ -2507,7 +2480,6 @@ Init_Object()
rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
rb_define_method(rb_mKernel, "frozen?", rb_obj_frozen_p, 0);
- rb_define_method(rb_mKernel, "to_a", rb_any_to_a, 0); /* to be removed */
rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
rb_define_method(rb_mKernel, "inspect", rb_obj_inspect, 0);
rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1);