lib/chunky_png.rb in chunky_png-1.3.12 vs lib/chunky_png.rb in chunky_png-1.3.13
- old
+ new
@@ -1,5 +1,7 @@
+# frozen-string-literal: true
+
# Basic requirements from standard library
require "set"
require "zlib"
require "stringio"
@@ -136,19 +138,13 @@
# Exception that is raised when requesting the DPI of a PNG that doesn't
# specify the units of its physical pixel dimensions.
class UnitsUnknown < ChunkyPNG::Exception
end
- # Empty byte array. This basically is an empty string, but with the encoding
- # set correctly to ASCII-8BIT (binary) in Ruby 1.9.
- # @return [String] An empty string, with encoding set to binary in Ruby 1.9
- # @private
- EMPTY_BYTEARRAY = "".force_encoding(Encoding::BINARY).freeze
-
# Null-byte, with the encoding set correctly to ASCII-8BIT (binary) in Ruby 1.9.
# @return [String] A binary string, consisting of one NULL-byte.
# @private
- EXTRA_BYTE = "\0".force_encoding(Encoding::BINARY).freeze
+ EXTRA_BYTE = "\0".b
end
require "chunky_png/version"
# PNG file structure