ruby-changes:35759
From: normal <ko1@a...>
Date: Wed, 8 Oct 2014 05:25:19 +0900 (JST)
Subject: [ruby-changes:35759] normal:r47841 (trunk): ext/etc/etc.c (etc_systmpdir): set default tmplen correctly
normal 2014-10-08 05:25:07 +0900 (Wed, 08 Oct 2014) New Revision: 47841 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47841 Log: ext/etc/etc.c (etc_systmpdir): set default tmplen correctly Fixup r47826. This fixes the following test failure for me: TestRequire#test_tainted_loadpath [test/ruby/test_require.rb:331]: SecurityError expected but nothing was raised. Modified files: trunk/ChangeLog trunk/ext/etc/etc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47840) +++ ChangeLog (revision 47841) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Oct 8 05:22:42 2014 Eric Wong <e@8...> + + * ext/etc/etc.c (etc_systmpdir): set default tmplen correctly + Fixup r47826 + Wed Oct 8 05:16:32 2014 Marc-Andre Lafortune <ruby-core@m...> * lib/matrix.rb: Add @- and @+ for Matrix and Vector. Index: ext/etc/etc.c =================================================================== --- ext/etc/etc.c (revision 47840) +++ ext/etc/etc.c (revision 47841) @@ -642,7 +642,7 @@ etc_systmpdir(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L642 #else const char default_tmp[] = "/tmp"; const char *tmpstr = default_tmp; - size_t tmplen = 0; + size_t tmplen = strlen(default_tmp); # if defined _CS_DARWIN_USER_TEMP_DIR #ifndef MAXPATHLEN #define MAXPATHLEN 1024 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/