1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

22 commits

Author SHA1 Message Date
nobu
01e1a0ac78 * ext/zlib/zlib.c (gzfile_raise): add invalid header to
exceptions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 02:44:04 +00:00
usa
fa1044927f * test/zlib/test_zlib.rb (test_adler32_combine, test_crc32_combine): skip if
they are not implemented.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19 02:42:57 +00:00
akr
47b8a0e7e4 avoid method redefinition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-14 03:09:53 +00:00
tenderlove
4395758903 * ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combine
* test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 00:06:04 +00:00
naruse
80918e2ac9 * ext/zlib/zlib.c (gzfile_read_all): use gzfile_newstr;
set and convert its encoding. [ruby-dev:38304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29 16:17:26 +00:00
knu
2bb576e5ac * ext/zlib/zlib.c (Zlib::GzipFile#path): New method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 16:31:06 +00:00
takano32
a3fb952a4f * test/zlib/test_zlib.rb(test_readchar): compare in same type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03 23:00:40 +00:00
matz
16549e33da * ext/stringio/stringio.c (strio_write): should convert writing
string to the encoding of the buffer.

* hash.c (rb_any_hash): typo fixed.

* ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion
  need to be done by to_s.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 14:14:13 +00:00
matz
42a6550027 * ext/zlib/zlib.c (rb_gzwriter_write): conversion should be done
using to_str, not to_s.

* ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion
  according to gz encoding.

* ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding
  before unget.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 12:56:48 +00:00
matz
b6ef272d02 * ext/zlib/zlib.c: remove obsolete prototype macros.
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
  structure.

* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.

* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
  single byte.

* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.

* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char

* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.

* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 09:18:34 +00:00
kazu
4c3799ec1d * test/zlib/test_zlib.rb (TestZlibDeflate#test_params): suppress a finalizer warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-23 01:09:50 +00:00
mame
dfd0d6a5ca * test/zlib/test_zlib.rb: add a test for Zlib::Deflate#params.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-11 14:06:19 +00:00
mame
65ec3ed9ca * test/zlib/test_zlib.rb: add tests to achieve over 90% test coverage
of zlib.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 12:51:25 +00:00
akr
68543f3092 use ML ref. for assertion message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 07:18:56 +00:00
akr
23a4871368 don't modify $/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-07 07:11:06 +00:00
akr
1ae2ac92d2 test_ungetc_paragraph: restore $/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-07 07:03:51 +00:00
akr
08907d87e0 add test for [ruby-dev:24060], [ruby-dev:24065], [ruby-dev:24103],
[ruby-dev:24190], [ruby-dev:24191], [ruby-dev:24194], [ruby-dev:24197],
[ruby-dev:24202], [ruby-dev:24213], [ruby-dev:24223] and [ruby-dev:24228].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-07 05:32:26 +00:00
akr
a3a55eb550 * ext/zlib/zlib.c: Zlib::GzipReader#read(0) returns "" instead of nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-06 16:01:02 +00:00
akr
b2a4f270e8 add test for [ruby-dev:23344].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07 05:06:34 +00:00
akr
dc252a75a2 check zlib existence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-06 02:59:13 +00:00
akr
22757fbaba update test_new_nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05 14:59:33 +00:00
akr
2f8c9ce629 * test/zlib/test_zlib.rb: new file.
(TestZlibGzipWriter#test_new_nil): test for [ruby-dev:23228].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05 13:27:45 +00:00