diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 13:37:10 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 13:37:10 +0000 |
commit | 92f480254b9c33907f92c74ad195327cfda2ed6f (patch) | |
tree | 14c9a6deb0d454b3123a56a12f830344ed9b65dd /test | |
parent | e2e29af2b6054dee368de55ba522c58f9038574e (diff) | |
download | ruby-92f480254b9c33907f92c74ad195327cfda2ed6f.tar.gz ruby-92f480254b9c33907f92c74ad195327cfda2ed6f.tar.xz ruby-92f480254b9c33907f92c74ad195327cfda2ed6f.zip |
* lib/rss/parser.rb, lib/rss/atom.rb, lib/rss/rss.rb,
test/rss/rss-assertions.rb, test/rss/test_atom.rb: use
pack/unpack("m") instead of base64 library.
* lib/webrick/httpproxy.rb: use delete("\n") instead of chomp/chop
because the result of pack("m") might be multi-line.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/rss/rss-assertions.rb | 2 | ||||
-rw-r--r-- | test/rss/test_atom.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index 41e6cd62c..dd06fb257 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -570,7 +570,7 @@ EOA text << char char.succ! end - base64_content = Base64.encode64(Zlib::Deflate.deflate(text)) + base64_content = [Zlib::Deflate.deflate(text)].pack("m").delete("\n") [false, true].each do |with_space| xml_content = base64_content diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb index c442c753b..1f65008fa 100644 --- a/test/rss/test_atom.rb +++ b/test/rss/test_atom.rb @@ -658,7 +658,7 @@ module RSS content.content = original_content xml = REXML::Document.new(content.to_s).root assert_rexml_element([], {"type" => type}, - Base64.encode64(original_content), xml) + [original_content].pack("m").delete("\n"), xml) end end |