summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-29 02:02:25 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-29 02:02:25 +0000
commit685a063a15d8f18b2f4c849b1faa1158e614eaba (patch)
tree6634b9a442b4522482c4a4caa2810ee20db26ec8
parent6cd63a70f6ecf416485261ee93c25c5f98879566 (diff)
Tidy array.c rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--array.c35
2 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 36e1ac4..b694ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Dec 29 11:00:16 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
+
+ * array.c: Tidy up RDoc loose ends.
+
Mon Dec 29 05:05:51 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
* struct.c, random: Add RDoc comments
diff --git a/array.c b/array.c
index caf9dc2..bbf2f6e 100644
--- a/array.c
+++ b/array.c
@@ -77,6 +77,14 @@ rb_ary_freeze(ary)
return rb_obj_freeze(ary);
}
+/*
+ * call-seq:
+ * array.frozen? => true or false
+ *
+ * Return <code>true</code> if this array is frozen (or temporarily frozen
+ * while being sorted).
+ */
+
static VALUE
rb_ary_frozen_p(ary)
VALUE ary;
@@ -1417,6 +1425,13 @@ inspect_ary(ary)
return str;
}
+/*
+ * call-seq:
+ * array.inspect => string
+ *
+ * Create a printable version of <i>array</i>.
+ */
+
static VALUE
rb_ary_inspect(ary)
VALUE ary;
@@ -1428,7 +1443,7 @@ rb_ary_inspect(ary)
/*
* call-seq:
- * array.to_a -> array
+ * array.to_a => array
*
* Returns _self_. If called on a subclass of Array, converts
* the receiver to an Array object.
@@ -1561,7 +1576,6 @@ sort_unlock(ary)
return ary;
}
-VALUE
/*
* call-seq:
* array.sort! => array
@@ -1578,6 +1592,7 @@ VALUE
* a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
*/
+VALUE
rb_ary_sort_bang(ary)
VALUE ary;
{
@@ -2430,6 +2445,14 @@ rb_ary_equal(ary1, ary2)
return Qtrue;
}
+/*
+ * call-seq:
+ * array.eql?(other) => true or false
+ *
+ * Returns <code>true</code> if _array_ and _other_ are the same object,
+ * or are both arrays with the same content.
+ */
+
static VALUE
rb_ary_eql(ary1, ary2)
VALUE ary1, ary2;
@@ -2446,6 +2469,14 @@ rb_ary_eql(ary1, ary2)
return Qtrue;
}
+/*
+ * call-seq:
+ * array.hash => fixnum
+ *
+ * Compute a hash-code for this array. Two arrays with the same content
+ * will have the same hash code (and will compare using <code>eql?</code>).
+ */
+
static VALUE
rb_ary_hash(ary)
VALUE ary;