Forum: Ruby-core [ruby-trunk - Bug #7105][Open] Socket documentation fix

Posted by davidbalbert (David Albert) (Guest)
on 2012-10-03 23:55
(Received via mailing list)
Issue #7105 has been reported by davidbalbert (David Albert).

----------------------------------------
Bug #7105: Socket documentation fix
https://bugs.ruby-lang.org/issues/7105

Author: davidbalbert (David Albert)
Status: Open
Priority: Normal
Assignee:
Category: DOC
Target version:
ruby -v: 2.0.0dev


The "Quick start" section of the Socket documentation refers to the 
Socket::INET constant, which doesn't exist. I've attached a small patch 
changing the reference to Socket::AF_INET, which seems consistent with 
the rest of the documentation (the alternative would be Socket::PF_INET, 
which has the same value).
Posted by zzak (Zachary Scott) (Guest)
on 2012-10-06 21:41
(Received via mailing list)
Issue #7105 has been updated by zzak (Zachary Scott).

Assignee set to zzak (Zachary Scott)
Target version set to 2.0.0


----------------------------------------
Bug #7105: Socket documentation fix
https://bugs.ruby-lang.org/issues/7105#change-30126

Author: davidbalbert (David Albert)
Status: Open
Priority: Normal
Assignee: zzak (Zachary Scott)
Category: DOC
Target version: 2.0.0
ruby -v: 2.0.0dev


The "Quick start" section of the Socket documentation refers to the 
Socket::INET constant, which doesn't exist. I've attached a small patch 
changing the reference to Socket::AF_INET, which seems consistent with 
the rest of the documentation (the alternative would be Socket::PF_INET, 
which has the same value).
Posted by zzak (Zachary Scott) (Guest)
on 2012-10-14 04:47
(Received via mailing list)
Issue #7105 has been updated by zzak (Zachary Scott).


Hello,
I've discussed this with another mri committer, and we've come to the 
conclusion that the example should use AF_INET, as socket(2) suggests:

"The  manifest  constants  used under 4.x BSD for protocol families are 
PF_UNIX, PF_INET, etc., while AF_UNIX etc. are used for address 
families.  However, already the BSD man page promises: "The protocol 
family generally is the same as the address family", and subsequent 
standards use AF_* everywhere."

PF_INET is just an alias.

I will commit this patch if there are no obligations. Thank you for your 
contribution David.
----------------------------------------
Bug #7105: Socket documentation fix
https://bugs.ruby-lang.org/issues/7105#change-30592

Author: davidbalbert (David Albert)
Status: Open
Priority: Normal
Assignee: zzak (Zachary Scott)
Category: DOC
Target version: 2.0.0
ruby -v: 2.0.0dev


The "Quick start" section of the Socket documentation refers to the 
Socket::INET constant, which doesn't exist. I've attached a small patch 
changing the reference to Socket::AF_INET, which seems consistent with 
the rest of the documentation (the alternative would be Socket::PF_INET, 
which has the same value).
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.