Skip to content

Instantly share code, notes, and snippets.

@3zcurdia
Created September 7, 2020 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3zcurdia/1e79c42a6aa6df306cd7c25ff840a970 to your computer and use it in GitHub Desktop.
Save 3zcurdia/1e79c42a6aa6df306cd7c25ff840a970 to your computer and use it in GitHub Desktop.
Ruby memory bomb
class Bomb
def method_missing(meth, *args, &blk)
self.class.send(:define_method, "is_#{meth}?") { true }
send("is_#{meth}?")
end
end
if __FILE__ == $0
require 'SecureRandom'
loop { Bomb.new.send(SecureRandom.hex) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment