Permalink
Browse files

Added a full_uri_escape because I'm tired of googling how to make rub…

…y escape colons.
  • Loading branch information...
Mat Schaffer
Mat Schaffer committed Aug 19, 2009
1 parent a555500 commit fd93fc63f0e9c4befde3e1df129c9f1e8d086f06
Showing with 6 additions and 0 deletions.
  1. +6 −0 dotfiles/irbrc
View
@@ -17,6 +17,12 @@ class Time
end
end
+class String
+ def full_uri_escape
+ URI.escape(self, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
+ end
+end
+
if ENV['RAILS_ENV']
def Object.method_added(method)
return super(method) unless method == :helper

0 comments on commit fd93fc6

Please sign in to comment.