diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-03-26 23:04:50 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-03-26 23:04:50 +0000 |
commit | 845f1f50df269091d645e78508fc833f539bb9b8 (patch) | |
tree | 18d9e8598fd9ff35d341d308b64cbaf70bdbfb33 /lib | |
parent | cb9a6b2b4f3d5b79e12e97a4ef9e75190803606a (diff) |
HttpUtils: inline rescue doesn't rescue LoadError, rewrite code to require rubygems before retrying htmlentities
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/core/utils/utils.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb index e1d61039..5dd4bea1 100644 --- a/lib/rbot/core/utils/utils.rb +++ b/lib/rbot/core/utils/utils.rb @@ -20,7 +20,12 @@ begin require 'htmlentities' $we_have_html_entities_decoder = true rescue LoadError - gems = require 'rubygems' rescue false + gems = nil + begin + gems = require 'rubygems' + rescue LoadError + gems = false + end if gems retry else |