Issue #9716 has been updated by Nobuyoshi Nakada.


Mario Maia wrote:
> What do you think? And, by the way, should we continue this conversation here or should I open a new bug reporting `#expand_path`?

Use `File.absolute_path`, instead of `File.expand_path`.

----------------------------------------
Bug #9716: FileTest.exist? does not convert relative path to absolute path before testing existence
https://bugs.ruby-lang.org/issues/9716#change-46199

* Author: Mario Maia
* Status: Rejected
* Priority: Normal
* Assignee: 
* Category: core
* Target version: 
* ruby -v: 2.1.1p76 (2014-02-24 revision 45161) [i686-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
`FileTest.exist?(Pathname.new('~/derp').expand_path) => true`
`FileTest.exist?(Pathname.new('~/derp')) => false`



-- 
https://bugs.ruby-lang.org/