Skip to content

Commit 685a063

Browse files
author
dave
committed
Tidy array.c rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 6cd63a7 commit 685a063

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Mon Dec 29 11:00:16 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
2+
3+
* array.c: Tidy up RDoc loose ends.
4+
15
Mon Dec 29 05:05:51 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
26

37
* struct.c, random: Add RDoc comments

array.c

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ rb_ary_freeze(ary)
7777
return rb_obj_freeze(ary);
7878
}
7979

80+
/*
81+
* call-seq:
82+
* array.frozen? => true or false
83+
*
84+
* Return <code>true</code> if this array is frozen (or temporarily frozen
85+
* while being sorted).
86+
*/
87+
8088
static VALUE
8189
rb_ary_frozen_p(ary)
8290
VALUE ary;
@@ -1417,6 +1425,13 @@ inspect_ary(ary)
14171425
return str;
14181426
}
14191427

1428+
/*
1429+
* call-seq:
1430+
* array.inspect => string
1431+
*
1432+
* Create a printable version of <i>array</i>.
1433+
*/
1434+
14201435
static VALUE
14211436
rb_ary_inspect(ary)
14221437
VALUE ary;
@@ -1428,7 +1443,7 @@ rb_ary_inspect(ary)
14281443

14291444
/*
14301445
* call-seq:
1431-
* array.to_a -> array
1446+
* array.to_a => array
14321447
*
14331448
* Returns _self_. If called on a subclass of Array, converts
14341449
* the receiver to an Array object.
@@ -1561,7 +1576,6 @@ sort_unlock(ary)
15611576
return ary;
15621577
}
15631578

1564-
VALUE
15651579
/*
15661580
* call-seq:
15671581
* array.sort! => array
@@ -1578,6 +1592,7 @@ VALUE
15781592
* a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
15791593
*/
15801594

1595+
VALUE
15811596
rb_ary_sort_bang(ary)
15821597
VALUE ary;
15831598
{
@@ -2430,6 +2445,14 @@ rb_ary_equal(ary1, ary2)
24302445
return Qtrue;
24312446
}
24322447

2448+
/*
2449+
* call-seq:
2450+
* array.eql?(other) => true or false
2451+
*
2452+
* Returns <code>true</code> if _array_ and _other_ are the same object,
2453+
* or are both arrays with the same content.
2454+
*/
2455+
24332456
static VALUE
24342457
rb_ary_eql(ary1, ary2)
24352458
VALUE ary1, ary2;
@@ -2446,6 +2469,14 @@ rb_ary_eql(ary1, ary2)
24462469
return Qtrue;
24472470
}
24482471

2472+
/*
2473+
* call-seq:
2474+
* array.hash => fixnum
2475+
*
2476+
* Compute a hash-code for this array. Two arrays with the same content
2477+
* will have the same hash code (and will compare using <code>eql?</code>).
2478+
*/
2479+
24492480
static VALUE
24502481
rb_ary_hash(ary)
24512482
VALUE ary;

0 commit comments

Comments
 (0)