Skip to content

Commit 00c7184

Browse files
committed
prerelease also counts
1 parent b8a90b9 commit 00c7184

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/mkrf_conf.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
2+
3+
def already_installed(dep)
4+
Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep) ||
5+
Gem::DependencyInstaller.new(:domain => :local,:prerelease => true).find_gems_with_sources(dep)
6+
end
7+
28
unless jruby
39
require 'rubygems'
410
require 'rubygems/command.rb'
@@ -29,7 +35,7 @@
2935
puts e.backtrace.join "\n "
3036
exit(1)
3137
end
32-
end unless Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep)
38+
end unless already_installed(dep)
3339
end
3440

3541
# create dummy rakefile to indicate success

0 commit comments

Comments
 (0)