Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* process.c (proc_exec_sh): don't strip leading spaces of the script.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit ea325fcd6757b5cbd8060d216d7645be72da5e62 1 parent f927ec1
@akr akr authored
Showing with 9 additions and 3 deletions.
  1. +4 −0 ChangeLog
  2. +5 −3 process.c
View
4 ChangeLog
@@ -1,3 +1,7 @@
+Thu Jun 14 22:10:50 2012 Tanaka Akira <akr@fsij.org>
+
+ * process.c (proc_exec_sh): don't strip leading spaces of the script.
+
Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* file.c (rb_file_s_basename, rb_file_s_dirname): documentaion fix.
View
8 process.c
@@ -1205,11 +1205,13 @@ proc_exec_sh(const char *str, VALUE envp_str)
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.