We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b6d20f commit fc89ff9Copy full SHA for fc89ff9
test/zlib/test_zlib.rb
@@ -804,10 +804,16 @@ def test_path_tmpfile
804
io.rewind
805
806
gz0 = Zlib::GzipWriter.new(io)
807
- assert_nil gz0.path
808
-
809
gz1 = Zlib::GzipReader.new(io)
810
- assert_nil gz1.path
+
+ if IO.method_defined?(:path)
+ assert_nil gz0.path
811
+ assert_nil gz1.path
812
+ else
813
+ assert_raise(NoMethodError) { gz0.path }
814
+ assert_raise(NoMethodError) { gz1.path }
815
+ end
816
817
gz0.close
818
gz1.close
819
end
0 commit comments