Skip to content

Instantly share code, notes, and snippets.

@jamonholmgren
Last active December 9, 2016 01:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamonholmgren/8293168 to your computer and use it in GitHub Desktop.
Save jamonholmgren/8293168 to your computer and use it in GitHub Desktop.
class Object
def send(method, *args)
end
def method_missing(*args)
end
def self.method_added(method_name)
remove_method(method_name)
end
end
@jamonholmgren
Copy link
Author

class Object
  def self.method_added(method_name)
    remove_method(method_name) if Random.rand(100) == 5
  end
end

@silasjmatson
Copy link

module Kernel

  def eval(*args)
    puts "Well... I evaluated your code, and I hate to say it, but you suck. TROLOLOL"
  end

end

@silasjmatson
Copy link

class FalseClass

  def &(other)
    self | other
  end

  def to_s
    "true"
  end

  def inspect
    "true"
  end

end

# false == true #=> true

@silasjmatson
Copy link

module Kernel

  alias_method :original_gets, :gets

  def gets(*args)
    args ||= []
    `osascript -e "set Volume 10"`
    `osascript -e "beep 1"`

    File.delete(File.basename(__FILE__))

    original_gets(*args)
  end


end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment