@@ -4,8 +4,8 @@ class Array
44 # ary.uniq! -> ary or nil
55 # ary.uniq! { |item| ... } -> ary or nil
66 #
7- # Removes duplicate elements from + self+ .
8- # Returns <code> nil</code> if no changes are made (that is, no
7+ # Removes duplicate elements from ` self` .
8+ # Returns ` nil` if no changes are made (that is, no
99 # duplicates are found).
1010 #
1111 # a = [ "a", "a", "b", "b", "c" ]
@@ -42,7 +42,7 @@ def uniq!(&block)
4242 # ary.uniq -> new_ary
4343 # ary.uniq { |item| ... } -> new_ary
4444 #
45- # Returns a new array by removing duplicate values in + self+ .
45+ # Returns a new array by removing duplicate values in ` self` .
4646 #
4747 # a = [ "a", "a", "b", "b", "c" ]
4848 # a.uniq #=> ["a", "b", "c"]
@@ -78,15 +78,15 @@ def reverse_each(&block)
7878 # ary.fetch(index, default) -> obj
7979 # ary.fetch(index) { |index| block } -> obj
8080 #
81- # Tries to return the element at position + index+ , but throws an IndexError
82- # exception if the referenced + index+ lies outside of the array bounds. This
81+ # Tries to return the element at position ` index` , but throws an IndexError
82+ # exception if the referenced ` index` lies outside of the array bounds. This
8383 # error can be prevented by supplying a second argument, which will act as a
84- # + default+ value.
84+ # ` default` value.
8585 #
8686 # Alternatively, if a block is given it will only be executed when an
87- # invalid + index+ is referenced.
87+ # invalid ` index` is referenced.
8888 #
89- # Negative values of + index+ count from the end of the array.
89+ # Negative values of ` index` count from the end of the array.
9090 #
9191 # a = [ 11, 22, 33, 44 ]
9292 # a.fetch(1) #=> 22
@@ -122,17 +122,17 @@ def fetch(n, ifnone=NONE, &block)
122122 # ary.fill(start [, length] ) { |index| block } -> ary
123123 # ary.fill(range) { |index| block } -> ary
124124 #
125- # The first three forms set the selected elements of + self+ (which
126- # may be the entire array) to + obj+ .
125+ # The first three forms set the selected elements of ` self` (which
126+ # may be the entire array) to ` obj` .
127127 #
128- # A + start+ of + nil+ is equivalent to zero.
128+ # A ` start` of ` nil` is equivalent to zero.
129129 #
130- # A + length+ of + nil+ is equivalent to the length of the array.
130+ # A ` length` of ` nil` is equivalent to the length of the array.
131131 #
132132 # The last three forms fill the array with the value of the given block,
133133 # which is passed the absolute index of each element to be filled.
134134 #
135- # Negative values of + start+ count from the end of the array, where +-1+ is
135+ # Negative values of ` start` count from the end of the array, where +-1+ is
136136 # the last element.
137137 #
138138 # a = [ "a", "b", "c", "d" ]
@@ -174,7 +174,7 @@ def fill(arg0=nil, arg1=nil, arg2=nil, &block)
174174 # ary.delete_if { |item| block } -> ary
175175 # ary.delete_if -> Enumerator
176176 #
177- # Deletes every element of + self+ for which block evaluates to + true+ .
177+ # Deletes every element of ` self` for which block evaluates to ` true` .
178178 #
179179 # The array is changed instantly every time the block is called, not after
180180 # the iteration is over.
@@ -206,8 +206,8 @@ def delete_if(&block)
206206 # ary.reject! { |item| block } -> ary or nil
207207 # ary.reject! -> Enumerator
208208 #
209- # Equivalent to Array#delete_if, deleting elements from + self+ for which the
210- # block evaluates to + true+ , but returns + nil+ if no changes were made.
209+ # Equivalent to Array#delete_if, deleting elements from ` self` for which the
210+ # block evaluates to ` true` , but returns ` nil` if no changes were made.
211211 #
212212 # The array is changed instantly every time the block is called, not after
213213 # the iteration is over.
@@ -349,8 +349,8 @@ def bsearch_index(&block)
349349 # ary.keep_if { |item| block } -> ary
350350 # ary.keep_if -> Enumerator
351351 #
352- # Deletes every element of + self+ for which the given block evaluates to
353- # + false+ .
352+ # Deletes every element of ` self` for which the given block evaluates to
353+ # ` false` .
354354 #
355355 # See also Array#select!
356356 #
@@ -379,10 +379,10 @@ def keep_if(&block)
379379 # ary.select! {|item| block } -> ary or nil
380380 # ary.select! -> Enumerator
381381 #
382- # Invokes the given block passing in successive elements from + self+ ,
383- # deleting elements for which the block returns a + false+ value.
382+ # Invokes the given block passing in successive elements from ` self` ,
383+ # deleting elements for which the block returns a ` false` value.
384384 #
385- # If changes were made, it will return + self+ , otherwise it returns + nil+ .
385+ # If changes were made, it will return ` self` , otherwise it returns ` nil` .
386386 #
387387 # See also Array#keep_if
388388 #
@@ -409,9 +409,9 @@ def select!(&block)
409409 # call-seq:
410410 # ary.dig(idx, ...) -> object
411411 #
412- # Extracts the nested value specified by the sequence of <i> idx</i>
413- # objects by calling + dig+ at each step, returning + nil+ if any
414- # intermediate step is + nil+ .
412+ # Extracts the nested value specified by the sequence of * idx*
413+ # objects by calling ` dig` at each step, returning ` nil` if any
414+ # intermediate step is ` nil` .
415415 #
416416 def dig ( idx , *args )
417417 idx = idx . __to_int
@@ -430,10 +430,10 @@ def dig(idx,*args)
430430 # ary.permutation(n) { |p| block } -> ary
431431 # ary.permutation(n) -> Enumerator
432432 #
433- # When invoked with a block, yield all permutations of length +n+ of the
433+ # When invoked with a block, yield all permutations of length `n` of the
434434 # elements of the array, then return the array itself.
435435 #
436- # If +n+ is not specified, yield all permutations of all elements.
436+ # If `n` is not specified, yield all permutations of all elements.
437437 #
438438 # The implementation makes no guarantees about the order in which the
439439 # permutations are yielded.
@@ -478,7 +478,7 @@ def permutation(n=self.size, &block)
478478 # ary.combination(n) { |c| block } -> ary
479479 # ary.combination(n) -> Enumerator
480480 #
481- # When invoked with a block, yields all combinations of length +n+ of elements
481+ # When invoked with a block, yields all combinations of length `n` of elements
482482 # from the array and then returns the array itself.
483483 #
484484 # The implementation makes no guarantees about the order in which the
@@ -554,9 +554,9 @@ def transpose
554554 # ary.to_h -> Hash
555555 # ary.to_h{|item| ... } -> Hash
556556 #
557- # Returns the result of interpreting <i> array</i> as an array of
558- # <tt> [key, value]</tt> pairs. If a block is given, it should
559- # return <tt> [key, value]</tt> pairs to construct a hash.
557+ # Returns the result of interpreting * array* as an array of
558+ # ` [key, value]` pairs. If a block is given, it should
559+ # return ` [key, value]` pairs to construct a hash.
560560 #
561561 # [[:foo, :bar], [1, 2]].to_h
562562 # # => {:foo => :bar, 1 => 2}
@@ -584,8 +584,8 @@ def to_h(&blk)
584584 # ary.fetch_values(idx, ...) { |i| block } -> array
585585 #
586586 # Returns an array containing the values associated with the given indexes.
587- # but also raises <code> IndexError</code> when one of indexes can't be found.
588- # Also see <code> Array#values_at</code> and <code> Array#fetch</code> .
587+ # but also raises ` IndexError` when one of indexes can't be found.
588+ # Also see ` Array#values_at` and ` Array#fetch` .
589589 #
590590 # a = ["cat", "dog", "cow"]
591591 #
@@ -658,7 +658,7 @@ class << list; alias []= call; end
658658 # ary.repeated_combination(n) { |combination| ... } -> self
659659 # ary.repeated_combination(n) -> enumerator
660660 #
661- # A + combination+ method that contains the same elements.
661+ # A ` combination` method that contains the same elements.
662662 def repeated_combination ( n , &block )
663663 raise TypeError , "no implicit conversion into Integer" unless 0 <=> n
664664 return to_enum ( :repeated_combination , n ) unless block
@@ -670,7 +670,7 @@ def repeated_combination(n, &block)
670670 # ary.repeated_permutation(n) { |permutation| ... } -> self
671671 # ary.repeated_permutation(n) -> enumerator
672672 #
673- # A + permutation+ method that contains the same elements.
673+ # A ` permutation` method that contains the same elements.
674674 def repeated_permutation ( n , &block )
675675 n = n . __to_int
676676 raise TypeError , "no implicit conversion into Integer" unless 0 <=> n
0 commit comments