diff --git a/lib/cocoapods-core/podfile/target_definition.rb b/lib/cocoapods-core/podfile/target_definition.rb index 1ecbce524..e05257504 100644 --- a/lib/cocoapods-core/podfile/target_definition.rb +++ b/lib/cocoapods-core/podfile/target_definition.rb @@ -174,7 +174,7 @@ def abstract=(abstract) # @return [String] the inheritance mode for this target definition. # def inheritance - get_hash_value('inheritance', 'complete') + get_hash_value('inheritance') || 'complete' end # Sets the inheritance mode for this target definition. @@ -907,7 +907,7 @@ def get_hash_value(key, base_value = nil) unless HASH_KEYS.include?(key) raise StandardError, "Unsupported hash key `#{key}`" end - internal_hash[key] = base_value if internal_hash[key].nil? + internal_hash[key] ||= base_value unless base_value.nil? internal_hash[key] end