Created
May 5, 2013 11:25
-
-
Save tachiba/5520546 to your computer and use it in GitHub Desktop.
monkeypatch for resolve-replace on ruby2.0.0p0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SEE: http://www.ruby-forum.com/topic/4411796 | |
class TCPSocket < IPSocket | |
def initialize(host, serv, *rest) | |
rest[0] = IPSocket.getaddress(rest[0]) if rest[0] | |
#rest[0] = IPSocket.getaddress(rest[0]) unless rest.empty? | |
original_resolv_initialize(IPSocket.getaddress(host), serv, *rest) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment