Issue #14640 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #14640: [win32] File.realpath treats a relative path with a drive letter as an absolute path.
https://bugs.ruby-lang.org/issues/14640

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: cruby-windows
* Target version: 2.6
* ruby -v: 2.6.0
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED
----------------------------------------
When `t` exists in the current directory under the drive C:,

```ruby
File.realpath("c:t") #=> No such file or directory @ realpath_rec - c:/t (Errno::ENOENT)
```

whereas `File.expand_path` returns `Dir.pwd + "/t"`.





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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>