Bug #2404: [PATCH] force_encoding on frozen string in gem_prelude
http://redmine.ruby-lang.org/issues/show/2404

Author: Sam Ruby
Status: Open, Priority: High
Category: core
ruby -v: ruby 1.9.2dev (2009-11-26 trunk 25926) [i686-linux]

Simply entering any gem command or even irb on Ubuntu produces the following:

Error loading gem paths on load path in gem_prelude
can't modify frozen string
<internal:gem_prelude>:70:in `force_encoding'
<internal:gem_prelude>:70:in `set_home'
<internal:gem_prelude>:38:in `dir'
<internal:gem_prelude>:83:in `set_paths'
<internal:gem_prelude>:47:in `path'
<internal:gem_prelude>:227:in `push_all_highest_version_gems_on_load_path'
<internal:gem_prelude>:301:in `<compiled>'

Note: on Linux, File::ALT_SEPARATOR=nil, so the gsub will not be executed.

Patch attached.


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