It's my test code: test.rb
f = File.new("test.txt", "a")
when i executed it with ruby 1.9.3p125, i got the result:
but when i executed it with jruby 1.7.4 (1.9.3p392), i got the result:
SystemCallError: Unknown error - Unknown Error (20047) - -1
size at org/jruby/RubyFile.java:1081
(root) at export.rb:2
I have a hunch that this may be related to #547.
As @BanzaiMan mentioned it I created the ticket #1240 with the same issue what's the status on this...?
Fixes #1272 and hopefully #770
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.