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.exists?("broken_symlink") returns true #1945

Closed
mpapis opened this issue Sep 3, 2014 · 3 comments
Closed

File.exists?("broken_symlink") returns true #1945

mpapis opened this issue Sep 3, 2014 · 3 comments
Milestone

Comments

@mpapis
Copy link
Contributor

@mpapis mpapis commented Sep 3, 2014

require 'fileutils'
File.open("nowhere.rb", "w") { |f| f.write "" }
FileUtils.ln_s("nowhere.rb", "link_to_nowhere.rb")
FileUtils.rm("nowhere.rb")
puts File.exists?("link_to_nowhere.rb")

returns false on MRI 1.9.3 - 2.1, returns true in JRuby 1.7.13 - 1.7.15

@monkstone
Copy link
Contributor

@monkstone monkstone commented Sep 4, 2014

I thought File.exists? was deprecated in favor of File.exist?, still broken though.

@chrisseaton
Copy link
Contributor

@chrisseaton chrisseaton commented Sep 5, 2014

Is this the kind of thing we should be pushing back to RubySpec?

@mpapis
Copy link
Contributor Author

@mpapis mpapis commented Sep 6, 2014

I believe yes, this issue broke my tests on travis ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants