lib/google/cloud/storage/policy.rb in google-cloud-storage-1.30.0 vs lib/google/cloud/storage/policy.rb in google-cloud-storage-1.31.0
- old
+ new
@@ -210,11 +210,11 @@
# @return [Policy]
#
def deep_dup
warn "DEPRECATED: Storage::PolicyV1#deep_dup"
dup.tap do |p|
- roles_dup = p.roles.each_with_object({}) do |(k, v), memo|
- memo[k] = v.dup rescue value
+ roles_dup = p.roles.transform_values do |v|
+ v.dup rescue value
end
p.instance_variable_set :@roles, roles_dup
end
end