diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-12 22:15:12 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-12 22:15:12 +0100 |
commit | 12a508e1a75bc1de501f36ca9e4767f2349fe12e (patch) | |
tree | 8ec4db236d70c064742b87c79feb86e783312e1c /data/rbot/plugins/dictclient.rb | |
parent | cafa66beb3392f30ba8f11e6763f690518512471 (diff) |
Ruby 1.9 cleanup: variables warnings
Fix most ruby 1.9 warnings about shadowed variables (still one remaining in
keywords.rb). The only significant changes are in the quiz game plugin.
Also fix an issue in dictclient where the block parameter of a method
was not correctly isolated from the previous parameter.
Diffstat (limited to 'data/rbot/plugins/dictclient.rb')
-rw-r--r-- | data/rbot/plugins/dictclient.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/dictclient.rb b/data/rbot/plugins/dictclient.rb index 34276dad..f55defa4 100644 --- a/data/rbot/plugins/dictclient.rb +++ b/data/rbot/plugins/dictclient.rb @@ -91,7 +91,7 @@ class DictClientPlugin < Plugin # the DICT object is automatically disconnected. the return value of the block # is returned from this method. # if an IRC message argument is passed, the error message will be replied - def with_dict(m=nil &block) + def with_dict(m=nil, &block) server, port = @bot.config['dictclient.server'].split ':' if @bot.config['dictclient.server'] server ||= 'dict.org' port ||= DICT::DEFAULT_PORT @@ -159,7 +159,7 @@ class DictClientPlugin < Plugin if results results.collect {|database, matches| @bot.config['dictclient.match_format'].gsub( - '<matches>', matches.collect {|m| format_headword m}.join(', ') + '<matches>', matches.collect {|hit| format_headword hit}.join(', ') ).gsub( '<database>', format_database(database) ) |