ruby-changes:24034
From: akr <ko1@a...>
Date: Thu, 14 Jun 2012 22:11:53 +0900 (JST)
Subject: [ruby-changes:24034] akr:r36085 (trunk): * process.c (proc_exec_sh): don't strip leading spaces of the script.
akr 2012-06-14 22:11:41 +0900 (Thu, 14 Jun 2012) New Revision: 36085 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36085 Log: * process.c (proc_exec_sh): don't strip leading spaces of the script. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36084) +++ ChangeLog (revision 36085) @@ -1,3 +1,7 @@ +Thu Jun 14 22:10:50 2012 Tanaka Akira <akr@f...> + + * process.c (proc_exec_sh): don't strip leading spaces of the script. + Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@r...> * file.c (rb_file_s_basename, rb_file_s_dirname): documentaion fix. Index: process.c =================================================================== --- process.c (revision 36084) +++ process.c (revision 36085) @@ -1205,11 +1205,13 @@ rb_notimplement(); UNREACHABLE; #else + const char *s; - while (*str == ' ' || *str == '\t' || *str == '\n') - str++; + s = str; + while (*s == ' ' || *s == '\t' || *s == '\n') + s++; - if (!*str) { + if (!*s) { errno = ENOENT; return -1; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/