lib/locale/driver/env.rb in locale-2.1.1 vs lib/locale/driver/env.rb in locale-2.1.2

- old
+ new

@@ -55,9 +55,10 @@ end # Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG) # * Returns: an Array of the locale as Locale::Tag::Posix or nil. def locales + return nil if (ENV["LC_ALL"] || ENV["LC_MESSAGES"] || ENV["LANG"]) == "C" locales = ENV["LANGUAGE"] if (locales != nil and locales.size > 0) locs = locales.split(/:/).collect{|v| Locale::Tag::Posix.parse(v)}.compact if locs.size > 0 return Locale::TagList.new(locs)