Sha256: 8b66d7e7b2c09721055ff4c041e8f7088344f766ca5b8bd3206654b8e8b3b63b

Contents?: true

Size: 266 Bytes

Versions: 2

Compression:

Stored size: 266 Bytes

Contents

require_relative "egonil/version"

module Kernel
  private

  def egonil
    mm = NilClass.instance_method(:method_missing)
    NilClass.send :define_method, :method_missing, ->(*){}
    yield
  ensure
    NilClass.send :define_method, :method_missing, mm
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
egonil-1.0.1 lib/egonil.rb
egonil-1.0.0 lib/egonil.rb