Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: Standard Library
    • Labels:
      None
    • Environment:
      JRuby 1.6.0 under RVM;
      Java version:
      Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
      Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
    • Number of attachments :
      0

      Description

      JRUBY 1.6.0:
      > jruby --1.9 -rsocket -e 'puts Socket.ip_address_list.to_s'

      NoMethodError: undefined method `ip_address_list' for Socket:Class
      (root) at -e:1

      RUBY 1.9.2:
      > ruby -rsocket -e 'puts Socket.ip_address_list.to_s'

      #<Addrinfo: 127.0.0.1>, #<Addrinfo: ::1>, #<Addrinfo: fe80::1%lo0>, #<Addrinfo: fd4c:ff64:4060:6fe4:c62c:3ff:fe37:f1af>, #<Addrinfo: fe80::6233:4bff:fe25:8724%en1>, #<Addrinfo: 10.0.42.14>, #<Addrinfo: fe80::c62c:3ff:fe37:f1af%utun0>, #<Addrinfo: fd00:6587:52d7:95:c62c:3ff:fe37:f1af>

        Issue Links

          Activity

          Hide
          Hiro Asari added a comment -

          Looks like we need Addrinfo class as well.

          Show
          Hiro Asari added a comment - Looks like we need Addrinfo class as well.
          Hide
          Duncan Mak added a comment -

          I started implementing this - since this is blocking my progress in JRUBY-5529.

          My work is available here: https://github.com/duncanmak/jruby/tree/implement-addrinfo

          I still got ways to go, and I'll update the bug once I got the test cases passing.

          Show
          Duncan Mak added a comment - I started implementing this - since this is blocking my progress in JRUBY-5529 . My work is available here: https://github.com/duncanmak/jruby/tree/implement-addrinfo I still got ways to go, and I'll update the bug once I got the test cases passing.
          Hide
          Charles Oliver Nutter added a comment -

          Duncan: Wow, I hadn't seen your work here! Bravo!

          I just committed a very primitive start at Addrinfo that appears to mirror some of your work. I very much want to get your stuff rolled into JRuby master, since you've gone much farther than I. I was making my updates on the JRUBY-6393 bug, but I will monitor this one too.

          Show
          Charles Oliver Nutter added a comment - Duncan: Wow, I hadn't seen your work here! Bravo! I just committed a very primitive start at Addrinfo that appears to mirror some of your work. I very much want to get your stuff rolled into JRuby master, since you've gone much farther than I. I was making my updates on the JRUBY-6393 bug, but I will monitor this one too.
          Hide
          Charles Oliver Nutter added a comment -
          commit d62a1a47e00e6ade7d8544bdc2dc56ad0be89daf
          Author: Charles Oliver Nutter <headius@headius.com>
          Date:   Fri Mar 9 21:49:41 2012 -0600
          
              Fix JRUBY-5647: Missing method Socket::ip_address_list
          
          Show
          Charles Oliver Nutter added a comment - commit d62a1a47e00e6ade7d8544bdc2dc56ad0be89daf Author: Charles Oliver Nutter <headius@headius.com> Date: Fri Mar 9 21:49:41 2012 -0600 Fix JRUBY-5647: Missing method Socket::ip_address_list
          Hide
          Postmodern added a comment -

          This bug is still present in JRuby 1.6.7 in 1.9 mode. It is triggered when resolving the addresses of a domain name, that has IPv6 addresses associated with it:

          Resolv.getaddresses('www.example.com')
          
          NoMethodError: undefined method `ip_address_list' for Socket:Class
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:399:in `use_ipv6?'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:392:in `each_address'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:115:in `each_address'
          	from org/jruby/RubyArray.java:1615:in `each'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:114:in `each_address'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:101:in `getaddresses'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:50:in `getaddresses'
          	from (irb):4:in `evaluate'
          	from org/jruby/RubyKernel.java:1088:in `eval'
          	from org/jruby/RubyKernel.java:1410:in `loop'
          	from org/jruby/RubyKernel.java:1197:in `catch'
          	from org/jruby/RubyKernel.java:1197:in `catch'
          	from /home/hal/.rvm/rubies/jruby-1.6.7/bin/jirb:17:in `(root)'
          
          Show
          Postmodern added a comment - This bug is still present in JRuby 1.6.7 in 1.9 mode. It is triggered when resolving the addresses of a domain name, that has IPv6 addresses associated with it: Resolv.getaddresses('www.example.com') NoMethodError: undefined method `ip_address_list' for Socket:Class from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:399:in `use_ipv6?' from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:392:in `each_address' from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:115:in `each_address' from org/jruby/RubyArray.java:1615:in `each' from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:114:in `each_address' from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:101:in `getaddresses' from /home/hal/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/resolv.rb:50:in `getaddresses' from (irb):4:in `evaluate' from org/jruby/RubyKernel.java:1088:in `eval' from org/jruby/RubyKernel.java:1410:in `loop' from org/jruby/RubyKernel.java:1197:in `catch' from org/jruby/RubyKernel.java:1197:in `catch' from /home/hal/.rvm/rubies/jruby-1.6.7/bin/jirb:17:in `(root)'
          Hide
          Hiro Asari added a comment -

          This requires a whole new class, and I don't think we will be backporting this to the 1.6 branch.

          Show
          Hiro Asari added a comment - This requires a whole new class, and I don't think we will be backporting this to the 1.6 branch.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Stephen Eley
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: