From 7f244f32d974cafa74f449853f940f194d08d6d2 Mon Sep 17 00:00:00 2001 From: David Gadling Date: Thu, 21 May 2009 11:53:19 -0700 Subject: multiple plugins: Changes to remove parenthesize warnings. All of these modules/plugins were generating warnings like this: warning: parenthesize argument(s) for future version This patch should fix all the warnings without affecting functionality. --- lib/rbot/core/irclog.rb | 4 ++-- lib/rbot/ircbot.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb index 40266772..f60bcbfa 100644 --- a/lib/rbot/core/irclog.rb +++ b/lib/rbot/core/irclog.rb @@ -47,7 +47,7 @@ class IrcLogModule < CoreBotModule end def timestamp(time) - return time.strftime @bot.config['irclog.timestamp_format'] + return time.strftime(@bot.config['irclog.timestamp_format']) end def event_irclog_list_changed(nolist, dolist) @@ -289,7 +289,7 @@ class IrcLogModule < CoreBotModule # If it's a file, we rename to filename.old.filedate up = dir.dup until File.exist? up - up.replace File.dirname up + up.replace(File.dirname(up)) end unless File.directory? up backup = up.dup diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 70be2a90..2825f7e6 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -789,7 +789,7 @@ class Bot missing = Dir.chdir(template_dir) { Dir.glob('*/**') } - Dir.chdir(@botclass) { Dir.glob('*/**') } missing.map do |f| dest = File.join(@botclass, f) - FileUtils.mkdir_p(File.dirname dest) + FileUtils.mkdir_p(File.dirname(dest)) FileUtils.cp File.join(template_dir, f), dest end else -- cgit v1.2.3