Project

General

Profile

Actions

Bug #911

closed

ArgumentError in Resolv#getaddress

Added by febuiles (Federico Builes) about 16 years ago. Updated over 13 years ago.

Status:
Closed
ruby -v:
ruby 1.8.6 (2009-08-05 patchlevel 384) [x86_64-linux]
[ruby-core:20723]

Description

=begin
Sometimes Resolv#getaddress fails with an ArgumentError when it should be raising a ResolvError:

$ ./irb
irb(main):001:0> require 'resolv'
=> true
irb(main):002:0> Resolv.getaddress("rewrq.rqweqwrw.rqww")
ArgumentError: wrong number of arguments (0 for 1)
from /usr/local/lib/ruby/1.8/resolv.rb:600:in initialize' from /usr/local/lib/ruby/1.8/resolv.rb:600:in exception'
from /usr/local/lib/ruby/1.8/resolv.rb:600:in raise' from /usr/local/lib/ruby/1.8/resolv.rb:600:in request'
from /usr/local/lib/ruby/1.8/resolv.rb:474:in each_resource' from /usr/local/lib/ruby/1.8/resolv.rb:919:in resolv'
from /usr/local/lib/ruby/1.8/resolv.rb:917:in each' from /usr/local/lib/ruby/1.8/resolv.rb:917:in resolv'
from /usr/local/lib/ruby/1.8/resolv.rb:916:in each' from /usr/local/lib/ruby/1.8/resolv.rb:916:in resolv'
from /usr/local/lib/ruby/1.8/resolv.rb:914:in each' from /usr/local/lib/ruby/1.8/resolv.rb:914:in resolv'
from /usr/local/lib/ruby/1.8/resolv.rb:466:in each_resource' from /usr/local/lib/ruby/1.8/resolv.rb:422:in each_address'
from /usr/local/lib/ruby/1.8/resolv.rb:249:in each_address' from /usr/local/lib/ruby/1.8/resolv.rb:248:in each'
from /usr/local/lib/ruby/1.8/resolv.rb:248:in each_address' from /usr/local/lib/ruby/1.8/resolv.rb:232:in getaddress'
from /usr/local/lib/ruby/1.8/resolv.rb:204:in getaddress' irb(main):003:0> Resolv.getaddress("rewrq.rqweqwrw.rqww") Resolv::ResolvError: no address for rewrq.rqweqwrw.rqww from /usr/local/lib/ruby/1.8/resolv.rb:233:in getaddress'
from /usr/local/lib/ruby/1.8/resolv.rb:204:in `getaddress'
from (irb)

This affects Ruby 1.8 and 1.9
=end


Files

fix_resolv_timeout.patch (486 Bytes) fix_resolv_timeout.patch febuiles (Federico Builes), 12/23/2008 10:30 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0