Eric Hodel wrote:
> On Jan 25, 2007, at 08:04, Justin Sa wrote:
>>> switch, and
>> I added the following to config_file.rb, and the proxy option works
>> after adding it, but somehow I'm guessing that's not what the  
>> designers
>> had in mind for this class...
>>
>> def []=(key, value)
>>   @hash[key.to_s]=value
>> end
> 
> You added it where?  Please submit a patch.  (If you just respond to
> this email with the patch its sure to get lost.)
> 


I can verify this fix works - at least for me :)

It seems command.rb (line 258) tries to set the configuration hash 
using:

  "Gem.configuration[:http_proxy] = options[:http_proxy]"

but there is no []= method to respond, so it spits the error. 
Interestingly, this is the only option that tries to set its value this 
way.

Adding this is /usr/local/lib/ruby/site_ruby/1.8/rubygems/config_file.rb 
(on my Mac) fixes the issue:

  def []=(key,value)
    @hash[key.to_s] = value
  end

I am probably not the best person to create a proper patch including 
tests (never really done it before), but I can post this to the website 
to capture it.


-- 
Posted via http://www.ruby-forum.com/.