[#63592] [ruby-trunk - Bug #10009] IO operation is 10x slower in multi-thread environment — normalperson@...
Issue #10009 has been updated by Eric Wong.
3 messages
2014/07/08
[#63682] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/13
[#63703] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/14
[#63743] [ruby-trunk - Bug #10037] Since r46798 on Solaris, "[BUG] rb_vm_get_cref: unreachable" during make — ngotogenome@...
Issue #10037 has been updated by Naohisa Goto.
3 messages
2014/07/15
[#64136] Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb — "Jeffrey 'jf' Lim" <jfs.world@...>
As per subject.
4 messages
2014/07/31
[#64138] Re: Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb
— "Jeffrey 'jf' Lim" <jfs.world@...>
2014/07/31
On Thu, Jul 31, 2014 at 6:03 PM, Jeffrey 'jf' Lim <[email protected]>
[ruby-core:64080] [ruby-trunk - Bug #10067] [Closed] File.file? misleading semantics & documentation for symbolic links
From:
e@...
Date:
2014-07-27 20:25:18 UTC
List:
ruby-core #64080
Issue #10067 has been updated by Zachary Scott.
Status changed from Assigned to Closed
% Done changed from 0 to 100
Applied in changeset r46978.
----------
* file.c: [DOC] Clarify how File.file? handles symbolic links. Also
cleaned up the rdoc style for this method, more to follow.
Originally reported by Michael Renner [Bug #10067]
----------------------------------------
Bug #10067: File.file? misleading semantics & documentation for symbolic links
https://bugs.ruby-lang.org/issues/10067#change-48089
* Author: Michael Renner
* Status: Closed
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version: current: 2.2.0
* ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The documentation for ``File.file?`` states:
"Returns true if the named file exists and is a regular file."
When trying that out I get the following results:
~~~
% /usr/bin/stat link
File: `link' -> `file'
Size: 4 Blocks: 0 IO Block: 4096 symbolic link
Device: 16h/22d Inode: 2804357 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 1000/ robe) Gid: ( 1000/ robe)
Access: 2014-07-19 01:01:51.514979670 +0200
Modify: 2014-07-19 01:01:50.799975936 +0200
Change: 2014-07-19 01:01:50.799975936 +0200
Birth: -
% ruby -e "puts File.file?('link')"
false
% ruby -e "puts File.symlink?('link')"
true
% touch file
% ruby -e "puts File.file?('link')"
true
% ruby -e "puts File.symlink?('link')"
true
%
~~~
which is entirely not what one would expect.
You need to decide if the ``File`` ``?``-methods offer [stat](http://pubs.opengroup.org/onlinepubs/009695399/functions/stat.html) _OR_ [lstat](http://pubs.opengroup.org/onlinepubs/009695399/functions/lstat.html) semantic, change it and document it accordingly.
The current documentation and implementation behavior is especially confusing since the [POSIX standard](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html) states that the type of a file can be either a regular file _OR_ a symlink, not both at the same time.
--
https://bugs.ruby-lang.org/