Actions
Bug #6732
closeddocumentation error in IPSocket#peeraddr
Description
ri1.9.3 IPSocket#peeraddr
says
TCPSocket.open("www.ruby-lang.org", 80) {|sock|
p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"]
p sock.peeraddr(true) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
p sock.peeraddr(false) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
p sock.peeraddr(:hostname) #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"]
p sock.peeraddr(:numeric) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
}
the third line is wrong: peeraddr(true) actually returns the same as peeraddr(:hostname)
Updated by shyouhei (Shyouhei Urabe) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by zzak (zzak _) almost 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r37812.
Joachim, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- ext/socket/ipsocket.c (IPSocket#peeraddr): Fix example
[ruby-core:46429] [Bug #6732]
Actions
Like0
Like0Like0