Bug #7105

Socket documentation fix

Added by David Albert over 1 year ago. Updated over 1 year ago.

[ruby-core:47828]
Status:Closed
Priority:Normal
Assignee:Zachary Scott
Category:doc
Target version:2.0.0
ruby -v:2.0.0dev Backport:

Description

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::AFINET, which seems consistent with the rest of the documentation (the alternative would be Socket::PFINET, which has the same value).

0001-Fix-typo-in-Socket-docs.patch Magnifier (800 Bytes) David Albert, 10/04/2012 06:55 AM

Associated revisions

Revision 37274
Added by Zachary Scott over 1 year ago

  • ext/socket/socket.c: Documentation for Socket Based on a patch by David Albert [Bug #7105]

History

#1 Updated by Zachary Scott over 1 year ago

  • Assignee set to Zachary Scott
  • Target version set to 2.0.0

#2 Updated by Zachary Scott over 1 year ago

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 PFUNIX, PFINET, etc., while AFUNIX 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.

#3 Updated by Zachary Scott over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37274.
David, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/socket/socket.c: Documentation for Socket Based on a patch by David Albert [Bug #7105]

Also available in: Atom PDF