ruby-changes:56645
From: Nobuyoshi <ko1@a...>
Date: Wed, 24 Jul 2019 22:07:35 +0900 (JST)
Subject: [ruby-changes:56645] Nobuyoshi Nakada: 1cce430324 (master): Suppress deflateParams() warnings
https://git.ruby-lang.org/ruby.git/commit/?id=1cce430324 From 1cce4303247110d94eab8326f187a2a80130b324 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 24 Jul 2019 22:07:10 +0900 Subject: Suppress deflateParams() warnings diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index fc2ab50..bc8b976 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -199,10 +199,10 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/test/zlib/test_zlib.rb#L199 z = Zlib::Deflate.new s = z.deflate("foo", Zlib::FULL_FLUSH) z.avail_out = 0 - z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) + EnvUtil.suppress_warning {z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)} s << z.deflate("bar", Zlib::FULL_FLUSH) z.avail_out = 0 - z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) + EnvUtil.suppress_warning {z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)} s << z.deflate("baz", Zlib::FINISH) assert_equal("foobarbaz", Zlib::Inflate.inflate(s)) @@ -415,10 +415,10 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/test/zlib/test_zlib.rb#L415 z = Zlib::Deflate.new s = z.deflate("foo" * 1000, Zlib::FULL_FLUSH) z.avail_out = 0 - z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) + EnvUtil.suppress_warning {z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)} s << z.deflate("bar" * 1000, Zlib::FULL_FLUSH) z.avail_out = 0 - z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) + EnvUtil.suppress_warning {z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)} s << z.deflate("baz" * 1000, Zlib::FINISH) z = Zlib::Inflate.new -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/