rubinius/rubinius — pull request #2040 by warrenseen (2012-11-20 12:39:52+00:00)
Title: Enhanced setsockopt parameter handling

Correctly handle the case where a Symbol or String is used instead of a socket
constant for level or optname in calls to BasicSocket#setsockopt.

This behaviour is consistent with MRI, which permits both the level and optname
params to be a string or symbol of the name.

These strings are also allowed to omit the prefix from both the level and the
optname, for example:
`:IPPROTO_TCP`, `"IPROTO_TCP"`, `:TCP`, and `"TCP"` are all considered equivalent to
`Socket::Constants::IPPROTO_TCP`.

This commit adds support for levels and optnames based on those supported in
the MRI 1.9 socket code.