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


=begin
Windows???expand_path???encoding??????違????????с?????

osx??????current directory???path???ユ???????????????????????encoding??????????????с??Windows???????????????篆罩c?????????????????障?????

 $ cat test_expand_path.rb
 # coding: sjis
 p File.expand_path("./a")
 p File.expand_path("./a").encoding
 $ ruby -v test_expand_path.rb
 ruby 2.1.0dev (2013-02-27 trunk 39526) [x86_64-darwin12.2.0]
 "/Users/hiroshi/work/a"
 #<Encoding:Windows-31J>
 $ cd ?????????
 $ ruby -v ../test_expand_path.rb
 ruby 2.1.0dev (2013-02-27 trunk 39526) [x86_64-darwin12.2.0]
 "/Users/hiroshi/work/?????????/a"
 #<Encoding:UTF-8>
=end

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

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/