Crystal: File.dirname is broken for directories ending with a non-latin letter

Created on 16 Mar 2020  路  2Comments  路  Source: crystal-lang/crystal

This code:

%w[
  /蟿蔚位蔚委伪/蟿蔚位蔚委伪
  /M氓ned氓/M氓ned氓
].each { |dir| pp File.dirname dir }

produces

"/蟿蔚位蔚委\xCE"
"/M氓ned\xC3"

https://carc.in/#/r/8q5k


Crystal 0.33.0 [612825a53] (2020-02-14)

LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu

bug topicfiles

Most helpful comment

On it.

All 2 comments

Stopped working in Crystal 0.28.0 (using the new impl. based on Path#dirname).

On it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sija picture Sija  路  3Comments

lbguilherme picture lbguilherme  路  3Comments

RX14 picture RX14  路  3Comments

nabeelomer picture nabeelomer  路  3Comments

grosser picture grosser  路  3Comments