Project

General

Profile

This project is closed and read-only.

Actions

Backport #2404

closed

[PATCH] force_encoding on frozen string in gem_prelude

Backport #2404: [PATCH] force_encoding on frozen string in gem_prelude

Added by rubys (Sam Ruby) almost 17 years ago. Updated about 7 years ago.

Status:
Closed
[ruby-core:26910]

Description

=begin
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 `'

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

Patch attached.
=end


Files

patch (476 Bytes) patch rubys (Sam Ruby), 11/26/2009 05:46 AM

Related issues 1 (0 open1 closed)

Has duplicate Backport191 - Backport #3584: Error loading gem paths on load path in gem_prelude can't modify frozen stringClosedyugui (Yuki Sonoda)Actions

Updated by rubys (Sam Ruby) almost 17 years ago Actions #1

=begin
Problem only occurs if the GEM_HOME environment variable is set.
=end

Updated by bitsweat (Jeremy Daer) almost 17 years ago Actions #2

=begin
To replicate on any platform:

GEM_HOME=foo ruby -e ''

Verified that the patch fixes it.
=end

Updated by ujihisa (Tatsuhiro Ujihisa) almost 17 years ago Actions #3

  • Status changed from Open to Assigned
  • Assignee set to drbrain (Eric Hodel)

=begin

=end

Updated by naruse (Yui NARUSE) almost 17 years ago Actions #4

  • Category set to core
  • Status changed from Assigned to Closed
  • Target version set to 1.9.2

=begin
fixed at r25932.
=end

Updated by wayneeseguin (Wayne E. Seguin) about 16 years ago Actions #5

=begin
This bug is now present and highly invasive in the newly released 1.9.1-p429

 › uname -a
 Linux ams-blm-p0 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

 › ruby -v
 ruby 1.9.1p429 (2010-07-02 revision 28523) [x86_64-linux]

 › gem --version 
 Error loading gem paths on load path in gem_prelude
 can't modify frozen string
 <internal:gem_prelude>:69:in `force_encoding'
 <internal:gem_prelude>:69:in `set_home'
 <internal:gem_prelude>:38:in `dir'
 <internal:gem_prelude>:76:in `set_paths'
 <internal:gem_prelude>:47:in `path'
 <internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
 <internal:gem_prelude>:355:in `<compiled>'
 1.3.7

 › irb
 Error loading gem paths on load path in gem_prelude
 can't modify frozen string
 <internal:gem_prelude>:69:in `force_encoding'
 <internal:gem_prelude>:69:in `set_home'
 <internal:gem_prelude>:38:in `dir'
 <internal:gem_prelude>:76:in `set_paths'
 <internal:gem_prelude>:47:in `path'
 <internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
 <internal:gem_prelude>:355:in `<compiled>'
 ruby-1.9.1-p429 > 

Whereas on the exact same host, same installation method (RVM):

 › uname -a
 Linux ams-blm-p0 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

 › ruby -v
 ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

 › gem --version 
 1.3.6

 › irb
 ruby-1.9.1-p378 > 

I am able to reproduce on my local as well as the server listed above.
Simply installing p429 triggers the bug.
(Local: ∴ uname -a => Darwin Genius.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 i386)

=end

Updated by nobu (Nobuyoshi Nakada) about 16 years ago Actions #6

  • Status changed from Closed to Assigned
  • Assignee changed from drbrain (Eric Hodel) to yugui (Yuki Sonoda)
  • Priority changed from 5 to Normal

=begin

=end

Updated by sferik (Erik Berlin) over 15 years ago Actions #7

=begin
This appears to still be an issue in 1.9.1 at patchlevel 431.

What is the reason why Sam's patch has not yet been merged? Also, why was priority changed high to normal?
=end

Updated by schmurfy (Julien A) about 15 years ago Actions #8 [ruby-core:36921]

That is awesome to see the latest ruby 1.9.1 version crippled with a bug reported with a patch 1 year ago, was it forgotten or is nobody using 1.9.1 ?

Updated by schmurfy (Julien A) about 15 years ago Actions #10 [ruby-core:37246]

Sadly I am, and for now I cannot switch to 1.9.2 since our application does not work on it as is ...

Updated by cczona (C. Zona) almost 15 years ago Actions #11 [ruby-core:39681]

Ping. Can we please get this patch merged to 1.9.1? Thanks.

Updated by jeremyevans0 (Jeremy Evans) about 7 years ago Actions #12

  • Status changed from Assigned to Closed
Actions

Also available in: PDF Atom