summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-09 01:04:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-09 01:04:46 +0000
commit861219ce4a8c91a6d94c0d138c2f2bf2b3c2337e (patch)
treeaf62e80ee75bdbc02137390728ac6ebb2375231e /array.c
parent0d3f9dbfe1ab1696d1c9b1ef46c9da4af786e629 (diff)
fix doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/array.c b/array.c
index bf7777dbfd..7e9dcfa073 100644
--- a/array.c
+++ b/array.c
@@ -1033,7 +1033,7 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
* a[0..2] = "A" #=> ["A", "4"]
* a[-1] = "Z" #=> ["A", "Z"]
* a[1..-1] = nil #=> ["A", nil]
- * a[1..-1] = [] #=> ["A"]
+ * a[1..-1] = [] #=> ["A"]
*/
static VALUE
@@ -3014,13 +3014,14 @@ permute0(long n, long r, long *p, long index, int *used, VALUE values)
* When invoked without a block, return an enumerator object instead.
*
* Examples:
+ *
* a = [1, 2, 3]
* a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
* a.permutation(1).to_a #=> [[1],[2],[3]]
* a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
* a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
- * a.permutation(0).to_a #=> [[]]: one permutation of length 0
- * a.permutation(4).to_a #=> [] : no permutations of length 4
+ * a.permutation(0).to_a #=> [[]] # one permutation of length 0
+ * a.permutation(4).to_a #=> [] # no permutations of length 4
*/
static VALUE
@@ -3094,13 +3095,14 @@ combi_len(long n, long k)
* When invoked without a block, returns an enumerator object instead.
*
* Examples:
+ *
* a = [1, 2, 3, 4]
* a.combination(1).to_a #=> [[1],[2],[3],[4]]
* a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
* a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
* a.combination(4).to_a #=> [[1,2,3,4]]
- * a.combination(0).to_a #=> [[]]: one combination of length 0
- * a.combination(5).to_a #=> [] : no combinations of length 5
+ * a.combination(0).to_a #=> [[]] # one combination of length 0
+ * a.combination(5).to_a #=> [] # no combinations of length 5
*
*/