Project

General

Profile

Actions

Bug #4345

closed

IRB fails with --disable-gems and Ubuntu default LANG variable

Added by luislavena (Luis Lavena) almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-01-30 trunk 30724) [i686-linux]
Backport:
[ruby-core:34990]

Description

=begin
Hello,

 $ echo $LANG
 LANG=en_US.UTF-8
 
 $ ruby -v
 ruby 1.9.3dev (2011-01-30 trunk 30724) [i686-linux]
 
 $ ruby --disable-gems -S irb
 /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:150:in `block in search_file': uninitialized constant IRB::Locale::Gem (NameError)
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:158:in `block in each_localized_path'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:167:in `each_sublocale'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:157:in `each_localized_path'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:145:in `search_file'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:124:in `find'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:108:in `load'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/locale.rb:32:in `initialize'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:114:in `new'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:114:in `init_config'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb/init.rb:16:in `setup'
         from /home/user/sandbox/ruby-trunk/lib/ruby/1.9.1/irb.rb:53:in `start'
         from /home/user/sandbox/ruby-trunk/bin/irb:12:in `'
 

If no disable-gems were present, IRB works.

unset LANG make IRB works even with --disable-gems

 $ ruby --disable-gems -S irb
 irb(main):001:0> exit
 

=end

Actions #1

Updated by headius (Charles Nutter) almost 14 years ago

=begin
IRB's localization support appears to try using RubyGems to load the localized file?

This was the commit that added it. Does not appear to exist in 1.9.2:

commit 09aefc43a54bff5c27c856de71af4d18e9223d59
Author: yugui
Date: Wed Jan 5 01:13:12 2011 +0000

 * lib/irb/locale.rb (IRB::Locale#search_file): make it possible
   to load a localization from a gem.
   (IRB::Locale#lc_path): obsoleted because of the change of #search_file
   (IRB::Locale#each_localized_path): new private method, based on lc_path
   (IRB::Locale#find): follows the change of #search_file.
   (IRB::Locale#load): removed duplicate with #find.
 
 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

=end

Actions #2

Updated by yugui (Yuki Sonoda) almost 14 years ago

  • Assignee set to yugui (Yuki Sonoda)

=begin

=end

Actions #3

Updated by yugui (Yuki Sonoda) almost 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30741.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/irb/locale.rb (IRB::Locale::#search_file):
    Gem might be undefined if --disable-gems. [ruby-core:34990]
    =end
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0