Bug #4170: DRb doesn't accept hostnames started with digits
http://redmine.ruby-lang.org/issues/show/4170

Author: Ding Deng
Status: Open, Priority: Normal
ruby -v: ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

With hostnames started with digits (e.g. druby://0x44:47975), DRb will throw "Invalid argument" exceptions:

/usr/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://0x44:47975 - #<Errno::EINVAL: Invalid argument - connect(2)> (DRb::DRbConnError)
        from /usr/lib/ruby/1.8/drb/drb.rb:729:in `each'
        from /usr/lib/ruby/1.8/drb/drb.rb:729:in `open'
        from /usr/lib/ruby/1.8/drb/drb.rb:1191:in `initialize'
        from /usr/lib/ruby/1.8/drb/drb.rb:1171:in `new'
        from /usr/lib/ruby/1.8/drb/drb.rb:1171:in `open'
        from /usr/lib/ruby/1.8/drb/drb.rb:1087:in `method_missing'
        from /usr/lib/ruby/1.8/drb/drb.rb:1105:in `with_friend'
        from /usr/lib/ruby/1.8/drb/drb.rb:1086:in `method_missing'
        from /home/0x44/.gem/ruby/1.8/gems/vmail-0.6.4/bin/vmail_client:13:in `send'
        from /home/0x44/.gem/ruby/1.8/gems/vmail-0.6.4/bin/vmail_client:13
        from /home/0x44/.gem/ruby/1.8/bin/vmail_client:19:in `load'
        from /home/0x44/.gem/ruby/1.8/bin/vmail_client:19

You may read more about this specific exception here:

https://github.com/danchoi/vmail/issues/issue/16

According to RFC 1123:

The syntax of a legal Internet host name was specified in RFC-952
[DNS:4].  One aspect of host name syntax is hereby changed: the
restriction on the first character is relaxed to allow either a
letter or a digit.  Host software MUST support this more liberal
syntax.

Therefore I suspect it a DRb bug. Thanks.


----------------------------------------
http://redmine.ruby-lang.org