Sha256: 456f850eb568193ba80c9add1a9f813896c051cc69e741035cf987a808125a08

Contents?: true

Size: 735 Bytes

Versions: 30

Compression:

Stored size: 735 Bytes

Contents

class Date
  alias broken_equals ==
  def ==(other)
    return false unless other.is_a?(Date)
    broken_equals(other)
  end
end

class Time
  alias broken_equals ==
  def ==(other)
    return false unless other.is_a?(Time)
    broken_equals(other)
  end
end

begin
  JSON.parse("test")
rescue Exception => e
  JSON.class_eval do
    class << self
      alias old_parse parse
    end
    def self.parse(*args, &block)
      old_parse *args, &block
    rescue Exception => e
      raise StandardError.new e.message
    end
  end unless e.is_a? StandardError
end

class Set
  def &(enum)
    n = self.class.new
    enum.each { |o| n.add(o) if include?(o) }
    n
  end
  alias intersection &
end unless Set.method_defined? :intersection

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
hyper-operation-0.5.9 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.8 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.7 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.6 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.5 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.4 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.3 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.2 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.1 lib/hyper-operation/opal_patches.rb
hyper-operation-0.5.0 lib/hyper-operation/opal_patches.rb