From: Masahiro Kawato Date: 2008-01-12T13:45:28+09:00 Subject: [ruby-dev:33060] Shellwords alias bug? 川戸と申します。 Ruby 1.9.0 のshellwordsライブラリにバグらしきものを見つけたので、報告します。 lib/shellwords.rb の中で、Shellwords.escape が Shellwords.shellsplit の別名 として定義されていますが、本来は Shellwords.shellescape の別名が正しいのでは ないでしょうか? $ ruby -v ruby 1.9.0 (2007-12-25 revision 14709) [i686-linux] $ irb irb(main):001:0> require 'shellwords' => true irb(main):002:0> Shellwords.shellescape('test string') => "test\\ string" irb(main):003:0> Shellwords.escape('test string') => ["test", "string"] trunkでも修正されていないようなので、一応パッチを作ってみました。 Index: lib/shellwords.rb =================================================================== --- lib/shellwords.rb (revision 15003) +++ lib/shellwords.rb (working copy) @@ -86,7 +86,7 @@ module_function :shellescape class << self - alias escape shellsplit + alias escape shellescape end # -- 川戸 正裕 (m-kawato@mwb.biglobe.ne.jp)