Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/calc_profit/core_ext/array.rb
Instance Method Summary collapse
-
#dup2 ⇒ Object
Duplicate each element of an Array into a new Array.
Instance Method Details
#dup2 ⇒ Object
Duplicate each element of an Array into a new Array
3 4 5 6 7 8 9 |
# File 'lib/calc_profit/core_ext/array.rb', line 3 def dup2 newa = [] self.each { |e| newa << e.dup } newa end |