lib/wsdirector/ext/deep_dup.rb in wsdirector-cli-0.3.0 vs lib/wsdirector/ext/deep_dup.rb in wsdirector-cli-0.4.0
- old
+ new
@@ -7,13 +7,13 @@
refine ::Hash do
# Based on ActiveSupport http://api.rubyonrails.org/classes/Hash.html#method-i-deep_dup
def deep_dup
each_with_object(dup) do |(key, value), hash|
hash[key] = if value.is_a?(::Hash) || value.is_a?(::Array)
- value.deep_dup
- else
- value
- end
+ value.deep_dup
+ else
+ value
+ end
end
end
end
refine ::Array do