diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:26:01 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:26:01 +0000 |
commit | a5ca52f4a5c9d87834f3d4bf3073d12df9a9dc74 (patch) | |
tree | 02658f539f6e35325e3313a510b97b07af8908a5 /activesupport/lib | |
parent | f91acf0258b3d40cbb31663e965669b7199be051 (diff) | |
download | rails-a5ca52f4a5c9d87834f3d4bf3073d12df9a9dc74.tar.gz rails-a5ca52f4a5c9d87834f3d4bf3073d12df9a9dc74.tar.bz2 rails-a5ca52f4a5c9d87834f3d4bf3073d12df9a9dc74.zip |
Missed commit. References #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/base64.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/base64.rb b/activesupport/lib/active_support/base64.rb new file mode 100644 index 0000000000..4fc8cd13a7 --- /dev/null +++ b/activesupport/lib/active_support/base64.rb @@ -0,0 +1,17 @@ +module ActiveSupport + if defined? ::Base64 + Base64 = ::Base64 + else + # Ruby 1.9 doesn't provide base64, so we wrap this here + module Base64 + + def self.encode64(data) + [data].pack("m") + end + + def self.decode64(data) + data.unpack("m").first + end + end + end +end |