Resolv.getaddress fails for non-existant hostname
-------------------------------------------------

                 Key: JRUBY-6054
                 URL: https://jira.codehaus.org/browse/JRUBY-6054
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6.4
            Reporter: Samuel Kadolph
            Assignee: Thomas E Enebo
            Priority: Minor


Using Resolv.getaddress causes an error when the hostname does not exist.

$ ruby -rresolv -e 'Resolv.getaddress("foobar")'
NoMethodError: undefined method `ip_address_list' for Socket:Class
     use_ipv6? at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:399
  each_address at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:392
  each_address at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:115
          each at org/jruby/RubyArray.java:1603
  each_address at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:114
    getaddress at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:92
    getaddress at 
/Users/i822055/.rvm/rubies/jruby-1.6.4/lib/ruby/1.9/resolv.rb:43
        (root) at -e:1


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to