Sha256: 181ef32744bdbc614bbbdd413ec87448b3964d8a4c39eadab8d8bae0ef56b78e

Contents?: true

Size: 281 Bytes

Versions: 3

Compression:

Stored size: 281 Bytes

Contents

unless Kernel.respond_to?(:Hash)
  module Kernel
    def Hash(arg)
      if arg.respond_to?(:to_hash)
        return arg.to_hash
      elsif arg.nil?
        return {}
      else
        fail TypeError, "TypeError: can't convert #{arg.class} into Hash"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
log2mail-0.0.1.pre4 lib/ext/kernel.rb
log2mail-0.0.1.pre3 lib/ext/kernel.rb
log2mail-0.0.1.pre2 lib/ext/kernel.rb