summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/exec_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_exec_command.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/commands/exec_command.rb b/lib/rubygems/commands/exec_command.rb
index 82f1734b58..c24ebbf711 100644
--- a/lib/rubygems/commands/exec_command.rb
+++ b/lib/rubygems/commands/exec_command.rb
@@ -216,7 +216,7 @@ to the same gem path as user-installed gems.
if spec.executables.size > 1
alert_error "Ambiguous which executable from gem `#{executable}` should be run: " \
- "the options are #{spec.executables}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
+ "the options are #{spec.executables.sort}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
terminate_interaction 1
end
diff --git a/test/rubygems/test_gem_commands_exec_command.rb b/test/rubygems/test_gem_commands_exec_command.rb
index 806a6b5424..db738b5e9f 100644
--- a/test/rubygems/test_gem_commands_exec_command.rb
+++ b/test/rubygems/test_gem_commands_exec_command.rb
@@ -374,7 +374,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
@cmd.invoke "a:2"
end
assert_equal 1, e.exit_code
- assert_equal "ERROR: Ambiguous which executable from gem `a` should be run: the options are [\"foo\", \"bar\"], specify one via COMMAND, and use `-g` and `-v` to specify gem and version\n", @ui.error
+ assert_equal "ERROR: Ambiguous which executable from gem `a` should be run: the options are [\"bar\", \"foo\"], specify one via COMMAND, and use `-g` and `-v` to specify gem and version\n", @ui.error
end
end