summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-12 21:06:27 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-12 21:06:27 +0100
commit0822301885f049e1b49d5cf20f640c1b0028d65b (patch)
tree01e6b156a78b0d8badc3588eea0e3419b5a1676d
parent450ab5c9615481acd9cfd5ac1cb24810460bd382 (diff)
Load the 1.9 compatibility code earlier
The compat19 code touches the monitor mixins which are used by the logger which is started as soon as ircbot.rb is loaded. To make sure the logger uses the compat code we must load compat19 before ircbot.
-rwxr-xr-xbin/rbot12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/rbot b/bin/rbot
index 2e460e33..06e6db30 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -89,8 +89,13 @@ if File.directory? "#{defaultlib}/rbot"
$:.unshift defaultlib
end
end
-
+
begin
+ # ruby 1.9 specific fixes
+ unless RUBY_VERSION < '1.9'
+ require 'rbot/compat19'
+ end
+
require 'rbot/ircbot'
rescue LoadError => e
puts "Error: couldn't find the rbot/ircbot module (or one of its dependencies)\n"
@@ -98,11 +103,6 @@ rescue LoadError => e
exit 2
end
-# ruby 1.9 specific fixes
-unless RUBY_VERSION < '1.9'
- require 'rbot/compat19'
-end
-
if ($opts["version"])
puts "rbot #{$version}"
exit 0