Sha256: 4f5e58b20bf46dfd35b45e98fb876659edcde313b06b3ae93c47dc1665715e60

Contents?: true

Size: 656 Bytes

Versions: 22

Compression:

Stored size: 656 Bytes

Contents

unless Enumerable.method_defined?(:map)
  module Enumerable
    alias map collect
  end
end

unless Enumerable.method_defined?(:select)
  module Enumerable
    alias select find_all
  end
end

unless Enumerable.method_defined?(:reject)
  module Enumerable
    def reject
      result = []
      each do |i|
        result.push i unless yield(i)
      end
      result
    end
  end
end

unless Enumerable.method_defined?(:sort_by)
  module Enumerable
    def sort_by
      map {|i| [yield(i), i] }.sort.map {|val, i| i }
    end
  end
end

unless File.respond_to?(:read)
  def File.read(fname)
    File.open(fname) {|f|
      return f.read
    }
  end
end

Version data entries

22 entries across 22 versions & 7 rubygems

Version Path
IOWA-1.0.3 external/tmail/tmail/compat.rb
IOWA-1.0.2 external/tmail/tmail/compat.rb
IOWA-1.0.0 external/tmail/tmail/compat.rb
yakischloba-tmail-pure-0.10.10 lib/tmail-pure/compat.rb
yakischloba-tmail-pure-0.10.9 lib/tmail-pure/compat.rb
actionmailer-2.0.0 lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
actionmailer-2.0.2 lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
actionmailer-2.0.4 lib/action_mailer/vendor/tmail-1.2.1/tmail/compat.rb
actionmailer-2.0.1 lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
actionmailer-2.0.5 lib/action_mailer/vendor/tmail-1.2.1/tmail/compat.rb
radiant-0.6.5.1 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
radiant-0.6.5 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
radiant-0.6.7 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
radiant-0.6.6 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
radiant-0.6.9 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
radiant-0.6.8 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
rumbster-1.0.0 vendor/tmail/compat.rb
spree-0.0.9 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
spree-0.2.0 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb
tmail-1.1.1 lib/tmail/compat.rb