Class: Gem::Specification
Instance Method Summary collapse
-
#sort_obj ⇒ Object
Overwrite this so that gems in the gems directory get preferred over gems from any other location.
Instance Method Details
#sort_obj ⇒ Object
Overwrite this so that gems in the gems directory get preferred over gems from any other location. If there are two gems of different versions in the gems directory, the later one will load as usual.
Returns
- Array
-
The object used for sorting gem specs.
24 25 26 |
# File 'lib/merb-core/core_ext/rubygems.rb', line 24 def sort_obj [@name, installation_path == File.join(defined?(Merb) && Merb.respond_to?(:root) ? Merb.root : Dir.pwd,"gems") ? 1 : -1, @version.to_ints, @new_platform == Gem::Platform::RUBY ? -1 : 1] end |