Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

66%
+2 −0
Challenges Keyword golfing

Ruby 3.1.0, 274 259 249 bytes -10 bytes thanks to Paradox in the Ruby discord BEGIN{END{alias module class begin rescue retry ensure end if self elsif defined? for$.in true do super while f...

posted 2y ago by south‭  ·  edited 2y ago by south‭

Answer
#5: Post edited by user avatar south‭ · 2022-12-29T06:04:15Z (almost 2 years ago)
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), ~~274~~ 259 bytes
  • ```RUBY
  • BEGIN{END{alias undef class
  • begin rescue
  • retry ensure end
  • if self and true or false
  • elsif defined?
  • for$.in 1do module B
  • super end
  • redo
  • next end
  • return def _ =yield end
  • case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc).
  • # [Ruby 3.1.0](https://www.ruby-lang.org/), ~~274~~ ~~259~~ 249 bytes
  • -10 bytes thanks to Paradox in the Ruby discord
  • ```ruby
  • BEGIN{END{alias module class
  • begin rescue
  • retry ensure end
  • if self
  • elsif defined?
  • for$.in true do
  • super while false until 0unless not __ENCODING__ and __LINE__ or nil
  • undef redo
  • next end
  • return def break =yield end
  • case when __FILE__ then else end}}
  • ```
  • [Attempt This Online!](https://ato.pxeger.com/run?1=NZBNTgMxDIX3OYUXbEEs2SAk6FCNVIUjjDITh0akDrJjlVHVk7DpAg7FUdjhKbDy__es9_7BOs6n06e2dHnz9X3frXt_6PzqEEoOArsatSBMJYi4EZ8zAaNMio6x8QxIoowWossJBEtyWMTSiCkTxjuXKl9c2VljRYjVib4iw36bDZtCEQSllgtcKxUUAaoNhqHzD0-r3q-HAQJFa2x631lRGSgXp2R8-8R4hG_trG8PKdMiDCNjeIHbOWOJ59kUTGe_RTLSY79ZSG2pcNG3hePx14A_H_79-AE)
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc).
#4: Post edited by user avatar south‭ · 2022-12-29T03:56:59Z (almost 2 years ago)
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), ~~274~~ 262 bytes
  • ```RUBY
  • BEGIN{END{alias undef class
  • if self&&true||false
  • begin rescue
  • retry ensure end
  • elsif defined?
  • for$.in 1do module B
  • super until1 end
  • redo
  • next end
  • return def _ =yield1 end
  • case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc).
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), ~~274~~ 259 bytes
  • ```RUBY
  • BEGIN{END{alias undef class
  • begin rescue
  • retry ensure end
  • if self and true or false
  • elsif defined?
  • for$.in 1do module B
  • super end
  • redo
  • next end
  • return def _ =yield end
  • case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc).
#3: Post edited by user avatar south‭ · 2022-12-29T03:13:08Z (almost 2 years ago)
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), 265 bytes
  • ```RUBY
  • BEGIN{END{
  • alias undef class
  • if self&&true||false
  • begin
  • rescue
  • retry
  • ensure
  • end
  • elsif defined?
  • for a in 1do
  • module B
  • super until1
  • end
  • redo
  • next
  • end
  • return
  • end
  • def _ =yield a;case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc). Hard to make any improvements because of the `end`s.
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), ~~274~~ 262 bytes
  • ```RUBY
  • BEGIN{END{alias undef class
  • if self&&true||false
  • begin rescue
  • retry ensure end
  • elsif defined?
  • for$.in 1do module B
  • super until1 end
  • redo
  • next end
  • return def _ =yield1 end
  • case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc).
#2: Post edited by user avatar south‭ · 2022-12-29T03:02:22Z (almost 2 years ago)
  • # [Ruby 3.1.0](https://jsoftware.com/#/), 274 bytes
  • ```RUBY
  • BEGIN{END{
  • alias undef class
  • if self and true or false
  • begin
  • rescue
  • retry
  • ensure
  • end
  • elsif defined?
  • for a in 1 do
  • module B
  • super until 1
  • end
  • redo
  • next
  • end
  • return
  • end
  • def _ =yield a;case __ENCODING__ when __LINE__ then __FILE__ else break while 1 until 2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc). Hard to make any improvements because of the `end`s.
  • # [Ruby 3.1.0](https://www.ruby-lang.org/en/), 265 bytes
  • ```RUBY
  • BEGIN{END{
  • alias undef class
  • if self&&true||false
  • begin
  • rescue
  • retry
  • ensure
  • end
  • elsif defined?
  • for a in 1do
  • module B
  • super until1
  • end
  • redo
  • next
  • end
  • return
  • end
  • def _ =yield a;case __ENCODING__ when __LINE__ then __FILE__ else break while1 until2 unless not nil end}}
  • ```
  • 41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc). Hard to make any improvements because of the `end`s.
#1: Initial revision by user avatar south‭ · 2022-03-03T10:36:38Z (over 2 years ago)
# [Ruby 3.1.0](https://jsoftware.com/#/), 274 bytes

```RUBY
BEGIN{END{
alias undef class
if self and true or false
begin
rescue
retry
ensure
end
elsif defined?
for a in 1 do
module B
super until 1
end
redo
next
end
return
end
def _ =yield a;case __ENCODING__ when __LINE__ then __FILE__ else break while 1 until 2 unless not nil end}}
```
41 total keywords that you can view [here](https://devdocs.io/ruby~3/keywords_rdoc). Hard to make any improvements because of the `end`s.