Sha256: caa984ce6561ea8b36ae0c38a3c66758523023ec363fe61322f4d5eaeec2e7b5

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

# To be used instead of require "cfpropertylist". Restores extensions from
# Plist overwritten by CFPropertyList.

require "cfpropertylist"
require "plist"

# Brute-force solution to conflict between #to_plist introduced by
# CFPropertyList and plist. Remove the method added by CFPropertyList
# and restore the method from Plist::Emit. Each class gains a
# #to_binary_plist method equivalent to #to_plist from CFPropertyList.
#
# CFPropertyList also adds Enumerator#to_plist, but there is no such
# method from Plist, so leave it.
[Array, Hash].each do |c|
  if c.method_defined?(:to_plist)
    begin
      c.send(:alias_method, :to_binary_plist, :to_plist)
      c.send(:remove_method, :to_plist)
    rescue NameError
    end
  end
  c.module_eval("include Plist::Emit")
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb
fastlane_hotfix-2.165.0 fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb
fastlane_hotfix-2.187.0 fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb