[#85940] [Ruby trunk Bug#14578] Forking a child process inside of a mutex crashes the ruby interpreter — ben.govero@...
Issue #14578 has been reported by bengovero (Ben Govero).
3 messages
2018/03/05
[#86205] [Ruby trunk Feature#14618] Add display width method to String for CLI — aycabta@...
Issue #14618 has been reported by aycabta (aycabta .).
3 messages
2018/03/19
[#86366] Re: [ruby-cvs:70102] usa:r63008 (trunk): get rid of test error/failure on Windows introduced at r62955 — Eric Wong <normalperson@...>
usa@ruby-lang.org wrote:
3 messages
2018/03/28
[ruby-core:85900] [Ruby trunk Bug#14570] Wired behavior of File.expand_path() on Windows
From:
lars@...
Date:
2018-03-02 21:31:20 UTC
List:
ruby-core #85900
Issue #14570 has been reported by larskanis (Lars Kanis).
----------------------------------------
Bug #14570: Wired behavior of File.expand_path() on Windows
https://bugs.ruby-lang.org/issues/14570
* Author: larskanis (Lars Kanis)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.0dev (2018-02-22 trunk 62518) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
`File.realpath` returns the path with the same upper/lower case characters as the input parameter. But `File.expand_path` is different. It adjusts the last part of the path (and only this) to the upper/lower case characters given from the file system.
```
require "fileutils"
FileUtils.mkdir_p("TestDir/abC/Xyz")
File.expand_path("testdir") # => "C:/Users/lars/TestDir"
File.expand_path("testdir/abc") # => "C:/Users/lars/testdir/abC"
File.expand_path("testdir/abc/XYZ") # => "C:/Users/lars/testdir/abc/Xyz"
File.realpath("testdir") # => "C:/Users/lars/testdir"
File.realpath("testdir/abc") # => "C:/Users/lars/testdir/abc"
File.realpath("testdir/abc/XYZ") # => "C:/Users/lars/testdir/abc/XYZ"
```
The file system on Windows is case insensitive. So this is not really a bug, but it's inconsistent and unexpected. I would expect that `File.expand_path` returns a path with upper/lowercase either entirely retrieved from the input parameter or from the file system, but not a mixture of both. I would also expect that `File.realpath` and `File.expand_path` have the same semantics in this regard.
Same behavior on `ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]`
--
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>