Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file size error on windows #770

pickerel opened this Issue May 26, 2013 · 3 comments


None yet
4 participants
Copy link

pickerel commented May 26, 2013

It's my test code: test.rb

f ="test.txt", "a")
p f.size

when i executed it with ruby 1.9.3p125, i got the result:
c:\test>ruby export.rb

but when i executed it with jruby 1.7.4 (1.9.3p392), i got the result:
c:\test>jruby export.rb
SystemCallError: Unknown error - Unknown Error (20047) - -1
size at org/jruby/
(root) at export.rb:2


This comment has been minimized.

Copy link

BanzaiMan commented Sep 14, 2013

I have a hunch that this may be related to #547.


This comment has been minimized.

Copy link

keeguon commented Nov 21, 2013

As @BanzaiMan mentioned it I created the ticket #1240 with the same issue what's the status on this...?

enebo added a commit that referenced this issue Nov 27, 2013


This comment has been minimized.

Copy link

enebo commented Nov 27, 2013

I changed the impl of size to use a different mechanism for determing size. This should work as well as File.stat.size does so I am assuming it will fix the problem here. fwiw, the original test case in this bug did not error for me when I started working on this but #1272 uncovered a second problem with jnr-posix fstat impl. Speculatively closing. Re-open if you have a problem still.

@enebo enebo closed this Nov 27, 2013

jayjlawrence added a commit to jayjlawrence/jruby that referenced this issue Dec 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.