2014-07-02から1日間の記事一覧
def expand(url) target_url = url loop do res = fetch(target_url) case res when Net::HTTPSuccess then return target_url when Net::HTTPRedirection then target_url = res["location"] else return res.value end end end 省略されている URL (t.co …