Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 5a30de87f43dd2f96e8911c1a2f5ccc42d1dabb0 1 parent 2b680a4
Fabien Franzen authored October 20, 2008

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  lib/minigems.rb
6  lib/minigems.rb
@@ -57,7 +57,8 @@ def gem(name, *versions)
57 57
       def require(path) # :nodoc:
58 58
         gem_original_require path
59 59
       rescue LoadError => load_error
60  
-        if File.basename(path).match(Gem::MiniGems::INLINE_REGEXP)
  60
+        if File.basename(path).match(Gem::MiniGems::INLINE_REGEXP) && 
  61
+          Object.const_defined?(:Inline)
61 62
           # RubyInline dynamically created .so/.bundle
62 63
           return gem_original_require(File.join(Inline.directory, path))
63 64
         elsif path == 'Win32API' && !Gem.win_platform?
@@ -121,7 +122,8 @@ def self.available?(name, *version_requirements)
121 122
     def self.activate(gem, *version_requirements)
122 123
       if match = find_name(gem, *version_requirements)
123 124
         activate_gem_from_path(match.first)
124  
-      elsif match = find_name(MiniGems.camel_case(gem), *version_requirements)
  125
+      elsif gem.is_a?(String) && 
  126
+        match = find_name(MiniGems.camel_case(gem), *version_requirements)
125 127
         activate_gem_from_path(match.first)
126 128
       else
127 129
         unless gem.respond_to?(:name) && gem.respond_to?(:version_requirements)

0 notes on commit 5a30de8

Please sign in to comment.
Something went wrong with that request. Please try again.