Issue #7881 has been updated by h.shirosaki (Hiroshi Shirosaki).


=begin

?????????違??筝?荐???????????潟?若???????吾?????????????current directory??????鴻????ユ????????????с??????
Encoding::CompatibilityError ???????????????????????????鴻?????????с??????с??????????????

expand_path??????????filesystem encoding???????????醇?с??????????違????ユ?????????違??.encode('filesystem')?????ゃ??????????????????????????????障????????

 # coding: euc-jp
 
 expand = File.expand_path('???')
 p [expand, expand.encoding]
 path = File.join(expand, "?????????")
 p [path, path.encoding]


?????????怨????????c??require "./b" ???≪?????? require_relative "b" ??с?????篏???????????????с?????

=end
----------------------------------------
Bug #7881: Windows ??с????鴻??ユ????????????鴻???????????????? require ???紊掩????????
https://bugs.ruby-lang.org/issues/7881#change-37295

Author: 5.5 (5 5)
Status: Assigned
Priority: Normal
Assignee: h.shirosaki (Hiroshi Shirosaki)
Category: core
Target version: next minor
ruby -v: ruby 1.9.3p385 (2013-02-06) [i386-mingw32]


=begin
Windows ??с????鴻??ユ????????????鴻???????????????? require ???紊掩???????障?????

Ruby 1.9.3 ??? p374鐚?p385 ??с????膠???莎激???????障?????鐚?p125 ??с?莎????????障????????
p286 ???????????????莎激???????????????c???????????障?????

???????????????
(1) d:/?????鴻?? ?????????????????若??篏???????
(2) d:/?????鴻??/a.rb ???筝?荐???????????吾????
(3) d:/?????鴻??/b.rb ???筝?荐???????????吾????
(4) cd /?????鴻??
(5) ruby a.rb

a.rb ????絎刻??
 
 # encoding: utf-8
 require "./b"

b.rb ????絎?

 # encoding: utf-8
 puts "No problem."
    
????????э??

cannot load such file -- ./b (LoadError)

?????冴?障?????

* ??????????弱?????????????鴻??????????????test???????????????罩e幻???篏??????障?????
* a.rb ???鴻??????????潟?潟?若????c?潟?違?? CP932 ????????????罩e幻???篏??????障?????
* require "./b" ??? require "./b".encode("CP932") ????????????罩e幻???篏??????障?????
* 罔?羣?羞私?????ゃ??????若?? gem ???泣?ゃ????? require ??с????障?????



=end



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