lib/core/facets/array/rotate.rb in facets-2.1.3 vs lib/core/facets/array/rotate.rb in facets-2.2.0

- old
+ new

@@ -9,12 +9,12 @@ # # A negative parameter reverses the order from front to back. # # [1,2,3].rotate(-1) #=> [2,3,1] # - # CREDIT Florian Gross - # CREDIT Thomas Sawyer + # CREDIT: Florian Gross + # CREDIT: Thomas Sawyer def rotate(n=1) self.dup.rotate!(n) end @@ -22,11 +22,11 @@ # # a = [1,2,3] # a.rotate! # a #=> [3,1,2] # - # CREDIT Florian Gross - # CREDIT Thomas Sawyer + # CREDIT: Florian Gross + # CREDIT: Thomas Sawyer def rotate!(n=1) n = n.to_int return self if (n == 0 or self.empty?) if n > 0