[Bug #1790] [patch] fix error message in Addrinfo#family_addrinfo

Bug #1790: [patch] fix error message in Addrinfo#family_addrinfo
http://redmine.ruby-lang.org/issues/show/1790

e$B5/I<<Te(B: Nobuhiro IMAI
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2009-07-19 trunk 24201) [i686-linux]

PDF e$B$r8+$D$DD/$a$F$$$?$i8+$D$1$?$N$G%Q%C%A$G$9!#e(B

Index: ext/socket/lib/socket.rb

— ext/socket/lib/socket.rb (revision 24202)
+++ ext/socket/lib/socket.rb (working copy)
@@ -15,7 +15,7 @@ class Addrinfo
if args.empty?
raise ArgumentError, “no address specified”
elsif Addrinfo === args.first

  •  raise ArgumentError, "too man argument" if args.length != 1
    
  •  raise ArgumentError, "too many arguments" if args.length != 1
    
    elsif self.ip?
    raise ArgumentError, “IP address needs host and port but
    #{args.length} arguments given” if args.length != 2
    host, port = args

e$B%A%1%C%He(B #1790 e$B$,99?7$5$l$^$7$?!#e(B (by Akira T.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r24207.

http://redmine.ruby-lang.org/issues/show/1790

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs