fix mixin config_name in the name.nil? case

This commit is contained in:
Pete Fritchman 2011-02-26 18:20:39 -08:00
parent c124238ad7
commit cd5fcb5664

View file

@ -57,7 +57,7 @@ module LogStash::Config::Mixin
# If no name given (nil), return the current name.
def config_name(name=nil)
@config_name = name if !name.nil?
LogStash::Config::Registry.registry[name] = self
LogStash::Config::Registry.registry[@config_name] = self
return @config_name
end