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::Stat.file? behaves different with CRuby #2556

Closed
islue opened this issue Feb 4, 2015 · 1 comment
Closed

File::Stat.file? behaves different with CRuby #2556

islue opened this issue Feb 4, 2015 · 1 comment
Milestone

Comments

@islue
Copy link

islue commented Feb 4, 2015

$ cat stat.rb
f = File.open('access_log', 'w')
system 'mv', 'access_log', 'accesslog.1'
puts "f.stat.file? #{f.stat.file?}"

$ rvm use ruby-1.9.3-p392
$ ruby stat.rb
f.stat.file? true

$ rvm use jruby-1.7.19
$ ruby stat.rb
Errno::ENOENT: No such file or directory - access_log
stat at org/jruby/RubyFile.java:471
(root) at stat.rb:3

Is there any other way to determine if a moved file is a file?

@enebo
Copy link
Member

enebo commented May 16, 2017

This works on 9k and 1.7.x is EOL so we will never fix it there. Resolving as WONTFIX.

@enebo enebo closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants