Created
January 12, 2011 04:38
-
-
Save headius/775696 to your computer and use it in GitHub Desktop.
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
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Today, this old gist helped me to solve this old problem:
http://stackoverflow.com/questions/27944875/error-while-installing-gem-on-windows-8-incompatible-character-encoding
And I don't even know Ruby. Thank you very much!
PS. The problem (https://bugs.ruby-lang.org/issues/4270) still seems to exist, at least on Windows, and it seems
resolv-idn
is not supported anymore. Maybe the issue should be opened again?