Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug where Gem::Dependency was being camel_case'd

  • Loading branch information...
commit 5a30de87f43dd2f96e8911c1a2f5ccc42d1dabb0 1 parent 2b680a4
@fabien authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/minigems.rb
View
6 lib/minigems.rb
@@ -57,7 +57,8 @@ def gem(name, *versions)
def require(path) # :nodoc:
gem_original_require path
rescue LoadError => load_error
- if File.basename(path).match(Gem::MiniGems::INLINE_REGEXP)
+ if File.basename(path).match(Gem::MiniGems::INLINE_REGEXP) &&
+ Object.const_defined?(:Inline)
# RubyInline dynamically created .so/.bundle
return gem_original_require(File.join(Inline.directory, path))
elsif path == 'Win32API' && !Gem.win_platform?
@@ -121,7 +122,8 @@ def self.available?(name, *version_requirements)
def self.activate(gem, *version_requirements)
if match = find_name(gem, *version_requirements)
activate_gem_from_path(match.first)
- elsif match = find_name(MiniGems.camel_case(gem), *version_requirements)
+ elsif gem.is_a?(String) &&
+ match = find_name(MiniGems.camel_case(gem), *version_requirements)
activate_gem_from_path(match.first)
else
unless gem.respond_to?(:name) && gem.respond_to?(:version_requirements)
Please sign in to comment.
Something went wrong with that request. Please try again.