From cafa66beb3392f30ba8f11e6763f690518512471 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 12 Jan 2011 21:25:57 +0100 Subject: Limit Comparable inclusion to Array Including Comparable at the top level causes infinite recursions in Ruby 1.9.2 --- lib/rbot/load-gettext.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3