Actions
Bug #2955
closedFile.expand_path raises unexpected CompatibilityError
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2010-03-13 trunk 26902) [x86_64-darwin10.2.0]
Backport:
Description
=begin
$ ./ruby -Ilib -e "p Encoding.find('filesystem')"
#Encoding:UTF-8
./ruby -Ilib -e "p 'あ'.encoding.ascii_compatible?"
true
$ ./ruby -Ilib -e "p File.expand_path('あ', '/')"
"/あ"
The above is ok but
$ ./ruby -Ilib -e "p File.expand_path('あ', '/'.force_encoding('US-ASCII'))"
-e:1:in expand_path': incompatible character encodings: UTF-8 and US-ASCII (Encoding::CompatibilityError) from -e:1:in
'
For me this is unexpected one.
=end
Updated by matz (Yukihiro Matsumoto) about 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r26909.
Sakuro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Actions
Like0
Like0