From: Akinori MUSHA Date: 2007-09-10T16:12:58+09:00 Subject: [ruby-dev:31770] Re: shellescape --pgp-sign-Multipart_Mon_Sep_10_16:12:58_2007-1 Content-Type: text/plain; charset=ISO-2022-JP At Mon, 10 Sep 2007 16:01:47 +0900, Nobuyoshi Nakada wrote: > At Mon, 10 Sep 2007 15:10:13 +0900, > Akinori MUSHA wrote in [ruby-dev:31768]: > > - Shellwords.shellescape を追加: > > Bourneシェルに解釈される可能性のある文字をエスケープして返す > > (仕様は実装およびコメントを参照のこと) > > > > - Shellwords.shelljoin を追加: > > 与えられた引数列から、Bourneシェルコマンドライン文字列を生成 > > して返す (shellescape を利用) > > > > - Shellwords.shellwords の別名 shellsplit を定義 > > モジュール関数に関する限り、shellというprefixはなくてもいいんじゃ > ないかと思うのですが、Shellwords.escapeやShellwords.join, > Shellwords.splitなどではまずいでしょうか。  私もそう思いました。しかし、現行のサンプルで include Shellwords する用例が載っているため、それを踏襲したコードが名前空間の汚染で 動かなくなる可能性があります。(特に split)  included() を定義して長い名前の方だけ落とすという手段はあるかも しれませんが…。 -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Different eyes see different things, Different hearts beat on different strings -- But there are times for you and me when all such things agree" --pgp-sign-Multipart_Mon_Sep_10_16:12:58_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBG5O57kgvvx5/Z4e4RAtZkAKCudDlBXZbalxdXf4V1aTh5wyTJngCgsMc5 6l5vrlslw8AslC4SXMYIyOA= =rQUv -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Sep_10_16:12:58_2007-1--