Sha256: da134f51751c91c5c39eb8c49f4b1b1b5a2ee10403e82c7c8779799f5c79f463

Contents?: true

Size: 299 Bytes

Versions: 12

Compression:

Stored size: 299 Bytes

Contents

class Array
  # Standard in Ruby 1.8.8. See official documentation[http://ruby-doc.org/core-1.9/classes/Array.html]
  class << self
    def self.try_convert(obj)
      return nil unless obj.respond_to?(:to_ary)
      Backports.coerce_to_ary(obj)
    end unless method_defined? :try_convert
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
backports-1.18.2 lib/backports/1.8.8/array.rb
backports-1.18.1 lib/backports/1.8.8/array.rb
backports-1.18.0 lib/backports/1.8.8/array.rb
backports-1.17.1 lib/backports/1.8.8/array.rb
backports-1.17.0 lib/backports/1.8.8/array.rb
backports-1.16.7 lib/backports/1.8.8/array.rb
backports-1.16.6 lib/backports/1.8.8/array.rb
backports-1.16.5 lib/backports/1.8.8/array.rb
backports-1.16.4 lib/backports/1.8.8/array.rb
backports-1.16.3 lib/backports/1.8.8/array.rb
backports-1.16.2 lib/backports/1.8.8/array.rb
backports-1.16.1 lib/backports/1.8.8/array.rb