Created
September 7, 2020 22:43
-
-
Save 3zcurdia/1e79c42a6aa6df306cd7c25ff840a970 to your computer and use it in GitHub Desktop.
Ruby memory bomb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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