ruby-changes:47994
From: normal <ko1@a...>
Date: Wed, 4 Oct 2017 08:47:35 +0900 (JST)
Subject: [ruby-changes:47994] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?}
normal 2017-10-04 08:47:29 +0900 (Wed, 04 Oct 2017) New Revision: 60108 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60108 Log: file.c: release GVL in File.{setuid?,setgid?,sticky?} * file.c (check3rdbyte): use rb_stat to release GVL Modified files: trunk/file.c Index: file.c =================================================================== --- file.c (revision 60107) +++ file.c (revision 60108) @@ -1883,9 +1883,7 @@ check3rdbyte(VALUE fname, int mode) https://github.com/ruby/ruby/blob/trunk/file.c#L1883 { struct stat st; - FilePathValue(fname); - fname = rb_str_encode_ospath(fname); - if (STAT(StringValueCStr(fname), &st) < 0) return Qfalse; + if (rb_stat(fname, &st) < 0) return Qfalse; if (st.st_mode & mode) return Qtrue; return Qfalse; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/