summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/core/utils/utils.rb20
-rw-r--r--lib/rbot/ircbot.rb6
2 files changed, 6 insertions, 20 deletions
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb
index f9912ebb..c47601c1 100644
--- a/lib/rbot/core/utils/utils.rb
+++ b/lib/rbot/core/utils/utils.rb
@@ -16,15 +16,6 @@ require 'set'
begin
require 'htmlentities'
rescue LoadError
- gems = nil
- begin
- gems = require 'rubygems'
- rescue LoadError
- gems = false
- end
- if gems
- retry
- else
module ::Irc
module Utils
UNESCAPE_TABLE = {
@@ -108,7 +99,6 @@ rescue LoadError
}
end
end
- end
end
begin
@@ -121,15 +111,6 @@ begin
end
end
rescue LoadError
- gems = nil
- begin
- gems = require 'rubygems'
- rescue LoadError
- gems = false
- end
- if gems
- retry
- else
module ::Irc
module Utils
# Some regular expressions to manage HTML data
@@ -150,7 +131,6 @@ rescue LoadError
AFTER_PAR2_REGEX = /<br(?:\s+[^>]*)?\/?>.*?<\/?(?:br|p|div|html|body|table|td|tr)(?:\s+[^>]*)?\/?>/im
end
end
- end
end
module ::Irc
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 6279cfe2..35fc2dfd 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -135,6 +135,12 @@ $interrupted = 0
# these first
require 'rbot/rbotconfig'
+begin
+ require 'rubygems'
+rescue LoadError
+ log "rubygems unavailable"
+end
+
require 'rbot/load-gettext'
require 'rbot/config'
require 'rbot/config-compat'