21 lines
655 B
Diff
21 lines
655 B
Diff
Fix compatibility with newer rubygems versions. Patch provided by
|
|
Tomoh K. in bug 391059.
|
|
|
|
--- lib/gettext/runtime/locale_path.rb.orig
|
|
+++ lib/gettext/runtime/locale_path.rb
|
|
@@ -52,7 +52,14 @@
|
|
|
|
load_path = $LOAD_PATH.dup
|
|
if defined? ::Gem
|
|
- load_path += Gem.all_load_paths
|
|
+ begin
|
|
+ load_path +=Gem::Specification.map{|s|s.gem_dir}
|
|
+ rescue NoMethodError
|
|
+ begin
|
|
+ load_path +=Gem.all_load_paths
|
|
+ rescue NoMethodError
|
|
+ end
|
|
+ end
|
|
end
|
|
load_path.map!{|v| v.match(/(.*?)(\/lib)*?$/); $1}
|
|
load_path.each {|path|
|