lib/unicode/sequence_name/index.rb in unicode-sequence_name-1.1.2 vs lib/unicode/sequence_name/index.rb in unicode-sequence_name-1.2.0
- old
+ new
@@ -1,8 +1,14 @@
-require 'rubygems/util'
-require_relative 'constants'
+# frozen_string_literal: true
+require "zlib"
+require_relative "constants"
+
module Unicode
module SequenceName
- INDEX = Marshal.load(Gem::Util.gunzip(File.binread(INDEX_FILENAME)))
+ File.open(INDEX_FILENAME, "rb") do |file|
+ serialized_data = Zlib::GzipReader.new(file).read
+ serialized_data.force_encoding Encoding::BINARY
+ INDEX = Marshal.load(serialized_data)
+ end
end
end