summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-13 16:38:57 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-13 16:38:57 +0100
commit22f6e518f5b82b9311ce2d1cb56bd269bbb5994f (patch)
tree27635afc5b4db6308a36bb17e5bfbf9890ec15cb /lib/rbot
parentb65844bd23671dd86df00cd9a12385ecabd4f447 (diff)
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.
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/config.rb2
1 files changed, 1 insertions, 1 deletions
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)