From 05eb6111d9f7f6485d8d264cbb24e6e9836322b8 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 11 Nov 2014 05:08:59 +0000 Subject: * lib/rubygems/commands/contents_command.rb (files_in_default_gem): remove useless sort. show_files will sort the result and another branch, files_in_gem, doesn't sort. it should be removed for consistency. * test/rubygems/test_gem_commands_contents_command.rb (test_execute_default_gem): adjust the sort algorithm with Gem::Commands::ContentsCommand#show_files, which sort items as array of [prefix, basename] not strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/rubygems') diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb index fb6906afd2..19e188efa5 100644 --- a/test/rubygems/test_gem_commands_contents_command.rb +++ b/test/rubygems/test_gem_commands_contents_command.rb @@ -203,10 +203,10 @@ lib/foo.rb end expected = [ - File.join(RbConfig::CONFIG['bindir'], 'default_command'), - File.join(RbConfig::CONFIG['rubylibdir'], 'default/gem.rb'), - File.join(RbConfig::CONFIG['archdir'], 'default_gem.so') - ].sort.join "\n" + [RbConfig::CONFIG['bindir'], 'default_command'], + [RbConfig::CONFIG['rubylibdir'], 'default/gem.rb'], + [RbConfig::CONFIG['archdir'].sub(/x86_64/,'armv7l'), 'default_gem.so'] + ].sort.map{|a|File.join a}.join "\n" assert_equal expected, @ui.output.chomp assert_equal "", @ui.error -- cgit v1.2.3