lib/unicode/emoji/index.rb in unicode-emoji-1.0.3 vs lib/unicode/emoji/index.rb in unicode-emoji-1.1.0

- old
+ new

@@ -1,10 +1,14 @@ # frozen_string_literal: true -require 'rubygems/util' -require_relative 'constants' +require "zlib" +require_relative "constants" module Unicode module Emoji - 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