<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'shellwords'
+
 require 'rubygems/command'
 require 'rubygems/dependency'
 require 'rubygems/version_option'
@@ -60,7 +62,9 @@ class Gem::Commands::OpenCommand &lt; Gem::Command
     if !editor
       say &quot;Either set $EDITOR, or use -c &lt;command_name&gt;&quot;
     else
-      success = system(editor, path)
+      command_parts = Shellwords.shellwords(editor)
+      command_parts &lt;&lt; path
+      success = system(*command_parts)
       if !success 
         raise Gem::CommandLineError, &quot;Could not run '#{editor} #{path}', exit code: #{$?.exitstatus}&quot;
       end</diff>
      <filename>lib/rubygems/commands/open_command.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,5 +38,4 @@ class Test_SomethingToTest &lt; Test::Unit::TestCase
       command.invoke()
     end
   end
-  
 end
\ No newline at end of file</diff>
      <filename>test/open_command_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bf2b15d4af4fc8f4fc29d7a81ec20e17a11358e0</id>
    </parent>
  </parents>
  <author>
    <name>Adam Sanderson</name>
    <email>netghost@gmail.com</email>
  </author>
  <url>http://github.com/adamsanderson/open_gem/commit/ee15a7eb61d254c4c9d92a2afc74e36ea3ad3880</url>
  <id>ee15a7eb61d254c4c9d92a2afc74e36ea3ad3880</id>
  <committed-date>2009-05-02T09:29:37-07:00</committed-date>
  <authored-date>2009-05-02T09:29:37-07:00</authored-date>
  <message>properly handles commands with arguments.</message>
  <tree>2d2e04694b0d5a509599eaf067562791cc64ae36</tree>
  <committer>
    <name>Adam Sanderson</name>
    <email>netghost@gmail.com</email>
  </committer>
</commit>
