This file contains hidden or 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
def open_uri(uri, options = {}, &block) | |
uri = URI.parse(uri) until URI === uri | |
proxy = uri.find_proxy | |
unless proxy.nil? | |
if proxy.user.nil? | |
options[:proxy] = proxy | |
else | |
options[:proxy_http_basic_authentication] = [proxy, proxy.user, proxy.password] | |
end | |
end |
This file contains hidden or 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
module Luhn | |
CODE_0 = "0".ord | |
CODE_9 = "9".ord | |
CODE_A = "A".ord | |
CODE_Z = "Z".ord | |
def self.add(data) | |
return data + get_char(data) | |
end |
NewerOlder