[前][次][番号順一覧][スレッド一覧]

ruby-changes:39954

From: nobu <ko1@a...>
Date: Mon, 5 Oct 2015 15:30:07 +0900 (JST)
Subject: [ruby-changes:39954] nobu:r52035 (trunk): ruby-runner.c.in: ignore empty env

nobu	2015-10-05 15:29:58 +0900 (Mon, 05 Oct 2015)

  New Revision: 52035

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52035

  Log:
    ruby-runner.c.in: ignore empty env
    
    * template/ruby-runner.c.in (main): ignore empty or separator-only
      value.

  Modified files:
    trunk/template/ruby-runner.c.in
Index: template/ruby-runner.c.in
===================================================================
--- template/ruby-runner.c.in	(revision 52034)
+++ template/ruby-runner.c.in	(revision 52035)
@@ -14,6 +14,9 @@ main(int argc, char **argv) https://github.com/ruby/ruby/blob/trunk/template/ruby-runner.c.in#L14
     static const char builddir[] = BUILDDIR;
     const char *libpath = getenv(LIBPATHENV);
     if (libpath) {
+	while (*libpath == PATH_SEP) ++libpath;
+    }
+    if (libpath && *libpath) {
 	size_t n = strlen(libpath);
 	char *e = malloc(sizeof(builddir)+n+1);
 	memcpy(e, builddir, sizeof(builddir)-1);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]