From 22f6e518f5b82b9311ce2d1cb56bd269bbb5994f Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 13 Feb 2008 16:38:57 +0100 Subject: config: Value#get() should return #default(), not @default @default may be a Proc, in which case the default value is obtained by calling the Proc. So use #default() that takes care of this already. --- lib/rbot/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rbot/config.rb b/lib/rbot/config.rb index 5661b3d1..23a445f9 100644 --- a/lib/rbot/config.rb +++ b/lib/rbot/config.rb @@ -63,7 +63,7 @@ module Config end def get return @manager.config[@key] if @manager.config.has_key?(@key) - return @default + return default end alias :value :get def set(value, on_change = true) -- cgit v1.2.3