From: Giuseppe Bilotta Date: Wed, 13 Feb 2008 15:38:57 +0000 (+0100) Subject: config: Value#get() should return #default(), not @default X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=22f6e518f5b82b9311ce2d1cb56bd269bbb5994f;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git 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. --- 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)