lib/mixlib/config.rb in mixlib-config-2.2.6 vs lib/mixlib/config.rb in mixlib-config-2.2.8
- old
+ new
@@ -434,11 +434,11 @@
# symbol<Symbol>: the plural name for contexts in the list
# symbol<Symbol>: the singular name for contexts in the list
# block<Block>: a block that will be run in the context of this new config
# class.
def config_context_list(plural_symbol, singular_symbol, &block)
- if configurables.has_key?(symbol)
+ if configurables.has_key?(plural_symbol)
raise ReopenedConfigurableWithConfigContextError, "Cannot redefine config value #{plural_symbol} with a config context"
end
unless config_context_lists.has_key?(plural_symbol)
config_context_lists[plural_symbol] = {
@@ -466,10 +466,10 @@
# symbol<Symbol>: the plural name for contexts in the list
# symbol<Symbol>: the singular name for contexts in the list
# block<Block>: a block that will be run in the context of this new config
# class.
def config_context_hash(plural_symbol, singular_symbol, &block)
- if configurables.has_key?(symbol)
+ if configurables.has_key?(plural_symbol)
raise ReopenedConfigurableWithConfigContextError, "Cannot redefine config value #{plural_symbol} with a config context"
end
unless config_context_hashes.has_key?(plural_symbol)
config_context_hashes[plural_symbol] = {