Skip to content

Instantly share code, notes, and snippets.

@headius
Created January 12, 2011 04:38
Show Gist options
  • Save headius/775696 to your computer and use it in GitHub Desktop.
Save headius/775696 to your computer and use it in GitHub Desktop.
diff --git a/lib/ruby/1.9/resolv.rb b/lib/ruby/1.9/resolv.rb
index 9a96c55..d535111 100644
--- a/lib/ruby/1.9/resolv.rb
+++ b/lib/ruby/1.9/resolv.rb
@@ -702,7 +702,7 @@ class Resolv
service = [host, port]
id = DNS.allocate_request_id(host, port)
request = msg.encode
- request[0,2] = [id].pack('n')
+ request[0,2] = [id].pack('U')
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
return @senders[[service, id]] =
Sender.new(request, data, sock, host, port)
@aderuwe
Copy link

aderuwe commented Mar 6, 2017

Thank you, 6 year old gist!!!!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment