summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/rubygems/commands/update_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb14
3 files changed, 25 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d5323901a8..478c86300d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Oct 19 07:14:40 2013 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems master 42543b6. Changes:
+
+ Fix `gem update` for gems with multiple platforms.
+
+ * test/rubygems: ditto.
+
Sat Oct 19 06:55:52 2013 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Update to RubyGems master 0a3814b. Changes:
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 7d7371818f..c3532841c3 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -112,7 +112,9 @@ command to remove old versions.
spec_tuples, errors = fetcher.search_for_dependency dependency
- raise errors.first unless errors.empty?
+ error = errors.find { |errors| errors.respond_to? :exception }
+
+ raise error if error
spec_tuples
end
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 181784b61c..01e95cbbb4 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -390,6 +390,20 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
end
+ def test_fetch_remote_gems_mismatch
+ platform = Gem::Platform.new 'x86-freebsd9'
+ a2_p = quick_spec 'a', 2 do |s| s.platform = platform end
+
+ util_setup_spec_fetcher @a2, a2_p
+
+ expected = [
+ [Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
+ Gem::Source.new(@gem_repo)],
+ ]
+
+ assert_equal expected, @cmd.fetch_remote_gems(@a1)
+ end
+
def test_fetch_remote_gems_prerelease
@cmd.options[:prerelease] = true