This repository was archived by the owner on Apr 13, 2024. It is now read-only.
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 22jruby = defined? ( JRUBY_VERSION ) || ( defined? ( RUBY_ENGINE ) && 'jruby' == RUBY_ENGINE )
33rbx = defined? ( RUBY_ENGINE ) && 'rbx' == RUBY_ENGINE
44
5- def already_installed ( dep )
6- !Gem ::DependencyInstaller . new ( :domain => :local ) . find_gems_with_sources ( dep ) . empty? ||
7- !Gem ::DependencyInstaller . new ( :domain => :local , :prerelease => true ) . find_gems_with_sources ( dep ) . empty?
8- end
9-
105unless jruby || rbx
116 require 'rubygems'
127 require 'rubygems/command.rb'
@@ -15,14 +10,14 @@ def already_installed(dep)
1510
1611 begin
1712 Gem ::Command . build_args = ARGV
18- rescue NoMethodError
13+ rescue NoMethodError
1914 end
2015
2116 if RUBY_VERSION < "1.9"
2217 dep = Gem ::Dependency . new ( "ruby-debug-base" , '>=0.10.4' )
2318 elsif RUBY_VERSION < '2.0'
2419 dep = Gem ::Dependency . new ( "ruby-debug-base19x" , '>=0.11.30.pre15' )
25- else
20+ else
2621 dep = Gem ::Dependency . new ( "debase" , '> 0' )
2722 end
2823
@@ -39,7 +34,7 @@ def already_installed(dep)
3934 puts e . backtrace . join "\n "
4035 exit ( 1 )
4136 end
42- end unless dep . nil? || already_installed ( dep )
37+ end unless dep . nil? || dep . matching_specs . any?
4338end
4439
4540# create dummy rakefile to indicate success
You can’t perform that action at this time.
0 commit comments