lib/config/options.rb in config-3.1.1 vs lib/config/options.rb in config-4.0.0
- old
+ new
@@ -14,18 +14,18 @@
marshal_dump.empty?
end
def add_source!(source)
# handle yaml file paths
- source = (Sources::YAMLSource.new(source)) if source.is_a?(String)
+ source = (Sources::YAMLSource.new(source)) if source.is_a?(String) || source.is_a?(Pathname)
source = (Sources::HashSource.new(source)) if source.is_a?(Hash)
@config_sources ||= []
@config_sources << source
end
def prepend_source!(source)
- source = (Sources::YAMLSource.new(source)) if source.is_a?(String)
+ source = (Sources::YAMLSource.new(source)) if source.is_a?(String) || source.is_a?(Pathname)
source = (Sources::HashSource.new(source)) if source.is_a?(Hash)
@config_sources ||= []
@config_sources.unshift(source)
end