summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-17 21:07:33 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-17 21:07:33 +0000
commit7729de4d91ffbf0fe8fa4f2a95b85d3406845471 (patch)
treed930ee058c37104d7cd892dbbb7c56dc775abebc /array.c
parente181ae53918c09139e7f60bf5ad32741d91339cd (diff)
* array.c: Documentation: change => in call-seq to ->.
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/array.c b/array.c
index 0e3c250ca1..280f45bba1 100644
--- a/array.c
+++ b/array.c
@@ -479,8 +479,8 @@ rb_check_array_type(VALUE ary)
* for any reason. This method can be used to check if an argument is an
* array.
*
- * Array.try_convert([1]) # => [1]
- * Array.try_convert("1") # => nil
+ * Array.try_convert([1]) #=> [1]
+ * Array.try_convert("1") #=> nil
*
* if tmp = Array.try_convert(arg)
* # the argument is an array
@@ -3559,9 +3559,9 @@ rb_ary_compact(VALUE ary)
* given, counts the number of elements yielding a true value.
*
* ary = [1, 2, 4, 2]
- * ary.count # => 4
- * ary.count(2) # => 2
- * ary.count{|x|x%2==0} # => 3
+ * ary.count #=> 4
+ * ary.count(2) #=> 2
+ * ary.count{|x|x%2==0} #=> 3
*
*/
@@ -4282,12 +4282,12 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
* and return +self+ instead.
*
*
- * [1,2,3].product([4,5]) # => [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
- * [1,2].product([1,2]) # => [[1,1],[1,2],[2,1],[2,2]]
- * [1,2].product([3,4],[5,6]) # => [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
+ * [1,2,3].product([4,5]) #=> [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
+ * [1,2].product([1,2]) #=> [[1,1],[1,2],[2,1],[2,2]]
+ * [1,2].product([3,4],[5,6]) #=> [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
* # [2,3,5],[2,3,6],[2,4,5],[2,4,6]]
- * [1,2].product() # => [[1],[2]]
- * [1,2].product([]) # => []
+ * [1,2].product() #=> [[1],[2]]
+ * [1,2].product([]) #=> []
*/
static VALUE
@@ -4381,7 +4381,7 @@ done:
* Returns first n elements from <i>ary</i>.
*
* a = [1, 2, 3, 4, 5, 0]
- * a.take(3) # => [1, 2, 3]
+ * a.take(3) #=> [1, 2, 3]
*
*/
@@ -4406,7 +4406,7 @@ rb_ary_take(VALUE obj, VALUE n)
* If no block is given, an enumerator is returned instead.
*
* a = [1, 2, 3, 4, 5, 0]
- * a.take_while {|i| i < 3 } # => [1, 2]
+ * a.take_while {|i| i < 3 } #=> [1, 2]
*
*/
@@ -4430,7 +4430,7 @@ rb_ary_take_while(VALUE ary)
* in an array.
*
* a = [1, 2, 3, 4, 5, 0]
- * a.drop(3) # => [4, 5, 0]
+ * a.drop(3) #=> [4, 5, 0]
*
*/
@@ -4460,7 +4460,7 @@ rb_ary_drop(VALUE ary, VALUE n)
* If no block is given, an enumerator is returned instead.
*
* a = [1, 2, 3, 4, 5, 0]
- * a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
+ * a.drop_while {|i| i < 3 } #=> [3, 4, 5, 0]
*
*/