Created
December 27, 2011 19:12
-
-
Save takuya/1524834 to your computer and use it in GitHub Desktop.
URLのデコード ref: http://qiita.com/items/1469
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
#!/usr/bin/env ruby | |
require 'uri' | |
str = ARGV.join if ARGV.size > 0 | |
str = STDIN.read unless ARGV.size > 0 | |
puts URI.encode(str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment