Project

General

Profile

Actions

Bug #12483

closed

File.expand_path does not normalize cwd

Added by nobu (Nobuyoshi Nakada) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:75957]

Description

https://github.com/rails/rails/issues/25303#issuecomment-224834804

I notice some other inconsistencies that may be related. Within a directory called "À" Dir.pwd returns a composed form, while expand_path returns a decomposed one:

À $ ruby -e 'p Dir.pwd.bytes'
[47, 85, 115, 101, 114, 115, 47, 102, 120, 110, 47, 116, 109, 112, 47, 195, 128]

À $ ruby -e 'p File.expand_path(".").bytes'
[47, 85, 115, 101, 114, 115, 47, 102, 120, 110, 47, 116, 109, 112, 47, 65, 204, 128]
Actions

Also available in: Atom PDF

Like0
Like0Like0