summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-12 21:25:57 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-12 21:25:57 +0100
commitcafa66beb3392f30ba8f11e6763f690518512471 (patch)
tree3cfafa0e9f56ded53506b13191f8687addc899ed /lib
parent0822301885f049e1b49d5cf20f640c1b0028d65b (diff)
Limit Comparable inclusion to Array
Including Comparable at the top level causes infinite recursions in Ruby 1.9.2
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/load-gettext.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb
index 5e2ec186..d45263e1 100644
--- a/lib/rbot/load-gettext.rb
+++ b/lib/rbot/load-gettext.rb
@@ -18,7 +18,9 @@ end
require 'gettext/version'
gettext_version = GetText::VERSION.split('.').map {|n| n.to_i}
- include Comparable # for Array#>=
+ class ::Array
+ include Comparable # for Array#>=
+ end
unless gettext_version >= [1, 8, 0]
raise GetTextVersionError, "Unsupported ruby-gettext version installed: #{gettext_version.join '.'}; supported versions are 1.8.0 and above"
end