[#45703] test_advise failure on GNU/Linux — Tanaka Akira <tanaka.akira@...>

今朝、気がついたのですが、手元で test_advise が失敗します。

11 messages 2012/06/05
[#45705] Re: test_advise failure on GNU/Linux — KOSAKI Motohiro <kosaki.motohiro@...> 2012/06/06

小崎です

[#45735] [ruby-trunk - Feature #6587][Open] proposal: adding new methods File.rootname and Pathname#rootname — "usa (Usaku NAKAMURA)" <usa@...>

14 messages 2012/06/14

[#45745] Re: [ruby-changes:24028] yugui:r36079 (trunk): Embedding CRuby interpreter without internal headers has been difficult — SASADA Koichi <ko1@...>

見逃していました.

19 messages 2012/06/14
[#45747] Re: [ruby-changes:24028] yugui:r36079 (trunk): Embedding CRuby interpreter without internal headers has been difficult — Yugui <yugui@...> 2012/06/15

2012/6/15 SASADA Koichi <ko1@atdot.net>:

[#45748] Re: [ruby-changes:24028] yugui:r36079 (trunk): Embedding CRuby interpreter without internal headers has been difficult — SASADA Koichi <ko1@...> 2012/06/15

 ささだです.

[#45794] :new_pgroup and :pgroup option for spawn. — Tanaka Akira <akr@...>

process.c で気がついたのですが、spawn に Windows 用の :new_pgroup というオプションが

12 messages 2012/06/23
[#45800] Re: :new_pgroup and :pgroup option for spawn. — "U.Nakamura" <usa@...> 2012/06/25

こんにちは、なかむら(う)です。

[#45818] [ruby-trunk - Feature #6643][Open] io.seek(off, :end) — "akr (Akira Tanaka)" <akr@...>

30 messages 2012/06/25

[ruby-dev:45812] Re: [ruby-cvs:43389] nobu:r36213 (trunk): popen: shell commands with envvar

From: Tanaka Akira <akr@...>
Date: 2012-06-25 08:13:56 UTC
List: ruby-dev #45812
2012/6/25  <nobu@ruby-lang.org>:
> nobu    2012-06-25 15:42:05 +0900 (Mon, 25 Jun 2012)
>
>  New Revision: 36213
>
>  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36213
>
>  Log:
>    popen: shell commands with envvar
>
>    * io.c (is_popen_fork): check if fork and raise NotImplementedError if
>      unavailable.
>    * io.c (rb_io_s_popen): allow shell commands with modified environment
>      variables.

IO.popen([str]) の str が shell の解釈を受けるようになって
おどろいたのですが、なにか話があったんでしょうか。

  % ./ruby -ve 'IO.popen(["echo foo"]){|f| p f.read }'
  ruby 2.0.0dev (2012-06-25 trunk 36211) [x86_64-linux]
  -e:1:in `popen': No such file or directory - echo foo (Errno::ENOENT)
	  from -e:1:in `<main>'

  % ./ruby -ve 'IO.popen(["echo foo"]){|f| p f.read }'
  ruby 2.0.0dev (2012-06-25 trunk 36214) [x86_64-linux]
  "foo\n"

とりあえず、現在はドキュメントと整合していない状態になっています。

IO.popen のドキュメントには

 *      [env, cmdname, arg1, ..., opts]          : command name and
zero or more arguments (no shell)

とか、

 *  If <i>cmd</i> is an +Array+ of +String+,
 *  then it will be used as the subprocess's +argv+ bypassing a shell.

などと書いてあるので。
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread

Prev Next