aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-11-11 16:35:04 +0000
committerLouise Crow <louise.crow@gmail.com>2013-11-12 15:15:50 +0000
commit8aa8e2f7409d961c89cf30c77bee0a68697b660a (patch)
treea765e9cb0899d29731073a0fc24d390330e7d171
parent4bbc708b0233e8e5e62f31be96ba5fc0569e7366 (diff)
Update method name in patched method.
-rw-r--r--lib/mail_handler/backends/mail_extensions.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mail_handler/backends/mail_extensions.rb b/lib/mail_handler/backends/mail_extensions.rb
index 0e4657ea7..87af526bf 100644
--- a/lib/mail_handler/backends/mail_extensions.rb
+++ b/lib/mail_handler/backends/mail_extensions.rb
@@ -29,6 +29,7 @@ module Mail
# HACK: Backport encoding fixes for Ruby 1.8 from Mail 2.5
# Can be removed when we no longer support Ruby 1.8
class Ruby18
+
def Ruby18.b_value_decode(str)
match = str.match(/\=\?(.+)?\?[Bb]\?(.+)?\?\=/m)
if match
@@ -81,11 +82,11 @@ module Mail
def Ruby19.b_value_decode(str)
match = str.match(/\=\?(.+)?\?[Bb]\?(.+)?\?\=/m)
if match
- encoding = match[1]
+ charset = match[1]
str = Ruby19.decode_base64(match[2])
# Rescue an ArgumentError arising from an unknown encoding.
begin
- str.force_encoding(fix_encoding(encoding))
+ str.force_encoding(pick_encoding(charset))
rescue ArgumentError
end
end