diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array/deep_dup.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/deep_dup.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/deep_dup.rb b/activesupport/lib/active_support/core_ext/array/deep_dup.rb new file mode 100644 index 0000000000..82f9805236 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/array/deep_dup.rb @@ -0,0 +1,6 @@ +class Array + # Returns a deep copy of array. + def deep_dup + map { |it| it.deep_dup } + end +end |