File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 11jruby = defined? ( JRUBY_VERSION ) || ( defined? ( RUBY_ENGINE ) && 'jruby' == RUBY_ENGINE )
22rbx = defined? ( RUBY_ENGINE ) && 'rbx' == RUBY_ENGINE
33
4- def already_installed ( dep )
5- !Gem ::DependencyInstaller . new ( :domain => :local ) . find_gems_with_sources ( dep ) . empty? ||
6- !Gem ::DependencyInstaller . new ( :domain => :local , :prerelease => true ) . find_gems_with_sources ( dep ) . empty?
7- end
8-
94unless jruby || rbx
105 require 'rubygems'
116 require 'rubygems/command.rb'
@@ -14,14 +9,14 @@ def already_installed(dep)
149
1510 begin
1611 Gem ::Command . build_args = ARGV
17- rescue NoMethodError
12+ rescue NoMethodError
1813 end
1914
2015 if RUBY_VERSION < "1.9"
2116 dep = Gem ::Dependency . new ( "ruby-debug-base" , '>=0.10.4' )
2217 elsif RUBY_VERSION < '2.0'
2318 dep = Gem ::Dependency . new ( "ruby-debug-base19x" , '>=0.11.30.pre15' )
24- else
19+ else
2520 dep = Gem ::Dependency . new ( "debase" , '> 0' )
2621 end
2722
@@ -38,7 +33,7 @@ def already_installed(dep)
3833 puts e . backtrace . join "\n "
3934 exit ( 1 )
4035 end
41- end unless dep . nil? || already_installed ( dep )
36+ end unless dep . nil? || dep . matching_specs . any?
4237end
4338
4439# create dummy rakefile to indicate success
You can’t perform that action at this time.
0 commit comments