ruby-changes:23990
From: akr <ko1@a...>
Date: Tue, 12 Jun 2012 21:41:21 +0900 (JST)
Subject: [ruby-changes:23990] akr:r36041 (trunk): * process.c (rb_exec_fillarg): treat '=' character as an meta
akr 2012-06-12 21:41:08 +0900 (Tue, 12 Jun 2012) New Revision: 36041 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36041 Log: * process.c (rb_exec_fillarg): treat '=' character as an meta character to detect assignments preceding command name. Modified files: trunk/ChangeLog trunk/process.c trunk/test/ruby/test_process.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36040) +++ ChangeLog (revision 36041) @@ -1,3 +1,8 @@ +Tue Jun 12 21:40:13 2012 Tanaka Akira <akr@f...> + + * process.c (rb_exec_fillarg): treat '=' character as an meta + character to detect assignments preceding command name. + Tue Jun 12 20:29:19 2012 Tanaka Akira <akr@f...> * include/ruby/intern.h (rb_exec_arg_init): deprecated. Index: process.c =================================================================== --- process.c (revision 36040) +++ process.c (revision 36041) @@ -1880,7 +1880,7 @@ for (p = RSTRING_PTR(prog); *p; p++) { if (!has_nonspace && *p != ' ' && *p != '\t') has_nonspace = 1; - if (!has_meta && strchr("*?{}[]<>()~&|\\$;'`\"\n#", *p)) + if (!has_meta && strchr("*?{}[]<>()~&|\\$;'`\"\n#=", *p)) has_meta = 1; if (has_nonspace && has_meta) break; Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 36040) +++ test/ruby/test_process.rb (revision 36041) @@ -1433,4 +1433,11 @@ } end + def test_sh_env + IO.popen("foofoo=barbar env") {|f| + lines = f.readlines + assert_operator(lines, :include?, "foofoo=barbar\n") + } + end if File.executable?("/bin/sh") + end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/