diff options
author | Xavier Noria <fxn@hashref.com> | 2012-01-02 14:00:32 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-01-02 14:00:32 -0800 |
commit | 7bdfbac580f7b03953f2aabf610d98c437da376e (patch) | |
tree | c130e4279ffee79d0cd6a69610480ff9eb9ca0d1 /activesupport/lib/active_support/xml_mini.rb | |
parent | 6e9cd3846811718611543dae049c000076319587 (diff) | |
parent | 5f09414f85edfa60ab54ce8b9f8b03874e0670dc (diff) | |
download | rails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.gz rails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.bz2 rails-7bdfbac580f7b03953f2aabf610d98c437da376e.zip |
Merge pull request #4267 from lest/3-2-deprecate-activesupport-base64
deprecate ActiveSupport::Base64
Diffstat (limited to 'activesupport/lib/active_support/xml_mini.rb')
-rw-r--r-- | activesupport/lib/active_support/xml_mini.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb index 1ea9a9d7e1..4df3fd0efa 100644 --- a/activesupport/lib/active_support/xml_mini.rb +++ b/activesupport/lib/active_support/xml_mini.rb @@ -48,7 +48,7 @@ module ActiveSupport "symbol" => Proc.new { |symbol| symbol.to_s }, "date" => Proc.new { |date| date.to_s(:db) }, "datetime" => Proc.new { |time| time.xmlschema }, - "binary" => Proc.new { |binary| ActiveSupport::Base64.encode64(binary) }, + "binary" => Proc.new { |binary| ::Base64.encode64(binary) }, "yaml" => Proc.new { |yaml| yaml.to_yaml } } unless defined?(FORMATTING) @@ -64,7 +64,7 @@ module ActiveSupport "boolean" => Proc.new { |boolean| %w(1 true).include?(boolean.strip) }, "string" => Proc.new { |string| string.to_s }, "yaml" => Proc.new { |yaml| YAML::load(yaml) rescue yaml }, - "base64Binary" => Proc.new { |bin| ActiveSupport::Base64.decode64(bin) }, + "base64Binary" => Proc.new { |bin| ::Base64.decode64(bin) }, "binary" => Proc.new { |bin, entity| _parse_binary(bin, entity) }, "file" => Proc.new { |file, entity| _parse_file(file, entity) } } @@ -148,14 +148,14 @@ module ActiveSupport def _parse_binary(bin, entity) #:nodoc: case entity['encoding'] when 'base64' - ActiveSupport::Base64.decode64(bin) + ::Base64.decode64(bin) else bin end end def _parse_file(file, entity) - f = StringIO.new(ActiveSupport::Base64.decode64(file)) + f = StringIO.new(::Base64.decode64(file)) f.extend(FileLike) f.original_filename = entity['name'] f.content_type = entity['content_type'] |