diff --git a/lib/cfpropertylist/rbCFPropertyList.rb b/lib/cfpropertylist/rbCFPropertyList.rb index fc2f03b..caec0e8 100644 --- a/lib/cfpropertylist/rbCFPropertyList.rb +++ b/lib/cfpropertylist/rbCFPropertyList.rb @@ -72,28 +72,12 @@ def append_node(parent, child) end end -class String - unless("".respond_to?(:bytesize)) then - def bytesize - self.length - end - end -end - dirname = File.dirname(__FILE__) require dirname + '/rbCFPlistError.rb' require dirname + '/rbCFTypes.rb' require dirname + '/rbBinaryCFPropertyList.rb' require dirname + '/rbPlainCFPropertyList.rb' -require 'iconv' unless "".respond_to?("encode") - -# ensure that the module and class exist -module Enumerable - class Enumerator - end -end - begin require dirname + '/rbLibXMLParser.rb' temp = LibXML::XML::Parser::Options::NOBLANKS # check if we have a version with parser options @@ -144,7 +128,7 @@ def guess(object, options = {}) when Time, DateTime, Date CFDate.new(object) - when Array, Enumerator, Enumerable::Enumerator + when Array, Enumerator ary = Array.new object.each do |o| ary.push CFPropertyList.guess(o, options)