1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gem_prelude.rb (Gem.set_home): must dup before force_encoding

and must force_encoding before gsub.
  cf. Yen Sign problem of SJIS [ruby-core:26910]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-11-26 11:22:44 +00:00
parent 39e457b4e7
commit 303b1d7fad
2 changed files with 33 additions and 26 deletions

View file

@ -1,3 +1,9 @@
Thu Nov 26 20:18:02 2009 NARUSE, Yui <naruse@ruby-lang.org>
* gem_prelude.rb (Gem.set_home): must dup before force_encoding
and must force_encoding before gsub.
cf. Yen Sign problem of SJIS [ruby-core:26910]
Thu Nov 26 17:54:37 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/{configure.bat, setup.mak, Makefile.sub}: add new configure

View file

@ -66,8 +66,9 @@ if defined?(Gem) then
end
def self.set_home(home)
home = home.gsub File::ALT_SEPARATOR, File::SEPARATOR if File::ALT_SEPARATOR
@gem_home = home.force_encoding(Encoding.find('filesystem'))
home = home.dup.force_encoding(Encoding.find('filesystem'))
home.gsub!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
@gem_home = home
end
def self.set_paths(gpaths)