Project

General

Profile

Actions

Bug #7105

closed

Socket documentation fix

Added by davidbalbert (David Albert) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Assignee:
Target version:
ruby -v:
2.0.0dev
Backport:
[ruby-core:47828]

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


Files

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

Updated by zzak (zzak _) over 11 years ago

  • Assignee set to zzak (zzak _)
  • Target version set to 2.0.0

Updated by zzak (zzak _) over 11 years 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 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.

Actions #3

Updated by zzak (zzak _) over 11 years 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] [ruby-core:47828]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0