Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 464223471a96
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7c4d118fb9a4
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 1, 2016

  1. Apply patch from rubygems/rubygems#1685

    Fixes #4019
    etehtsea committed Oct 1, 2016
    Copy the full SHA
    63fcab8 View commit details

Commits on Oct 5, 2016

  1. Copy the full SHA
    7c4d118 View commit details
Showing with 13 additions and 14 deletions.
  1. +13 −14 lib/ruby/stdlib/rubygems/commands/query_command.rb
27 changes: 13 additions & 14 deletions lib/ruby/stdlib/rubygems/commands/query_command.rb
Original file line number Diff line number Diff line change
@@ -255,22 +255,21 @@ def entry_versions entry, name_tuples, platforms, specs
name_tuples.map { |n| n.version }.uniq
else
platforms.sort.reverse.map do |version, pls|
if pls == [Gem::Platform::RUBY] then
if options[:domain] == :remote || specs.all? { |spec| spec.is_a? Gem::Source }
version
else
spec = specs.select { |s| s.version == version }
if spec.first.default_gem?
"default: #{version}"
else
version
end
out = version.to_s

if options[:domain] == :local
default = specs.any? do |s|
!s.is_a?(Gem::Source) && s.version == version && s.default_gem?
end
else
ruby = pls.delete Gem::Platform::RUBY
platform_list = [ruby, *pls.sort].compact
"#{version} #{platform_list.join ' '}"
out = "default: #{out}" if default
end

if pls != [Gem::Platform::RUBY] then
platform_list = [pls.delete(Gem::Platform::RUBY), *pls.sort].compact
out = platform_list.unshift(out).join(' ')
end

out
end
end