IO#stat doesn't work in some cases on Windows
---------------------------------------------
Key: JRUBY-2665
URL: http://jira.codehaus.org/browse/JRUBY-2665
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.2
Environment: Latest JRuby 1.1.2+ on Windows
Reporter: Vladimir Sizikov
Consider the two following cases:
1. jruby -e "rd, rw = IO.pipe; p rd.stat" # ==> -e:1: No such file or directory
- No such file or directory - -1 (Errno::ENOENT)
2. jruby -e "p IO.new($stdin.fileno).stat" # ===> -e:1: No such file or
directory - No such file or directory - -1 (Errno::ENOENT)
Both cases work fine under MRI:
1. ruby -e "p IO.new($stdin.fileno).stat"
#<File::Stat dev=0x0, ino=0, mode=020000, nlink=1, uid=0, gid=0, rdev=0x0,
size=0, blksize=nil, blocks=nil, at
ime=Thu Jan 01 01:00:00 +0100 1970, mtime=Thu Jan 01 01:00:00 +0100 1970,
ctime=Thu Jan 01 01:00:00 +0100 1970>
2. ruby -e "rd, rw = IO.pipe; p rd.stat"
#<File::Stat dev=0x3, ino=0, mode=010000, nlink=1, uid=0, gid=0, rdev=0x3,
size=0, blksize=nil, blocks=nil, at
ime=Thu Jan 01 01:00:00 +0100 1970, mtime=Thu Jan 01 01:00:00 +0100 1970,
ctime=Thu Jan 01 01:00:00 +0100 1970
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email