# File lib/mail/encodings.rb, line 228 def Encodings.q_value_encode(encoded_str, encoding = nil) return encoded_str if encoded_str.to_s.ascii_only? string, encoding = RubyVer.q_value_encode(encoded_str, encoding) string.gsub!("=\r\n", '') # We already have limited the string to the length we want map_lines(string) do |str| "=?#{encoding}?Q?#{str.chomp.gsub(/ /, '_')}?=" end.join(" ") end