hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

Brian Kung

I don't know if this is good or bad, but I just discovered that you can use `if ABC unless XYZ` in Ruby:

```
fail "`alphabet` must not include numbers" if alphabet =~ /\d/ unless alphabet.nil?
```

I like it probably way too much! this helps with multiple unless conditions being way too confusing. Or potentially I could look away for 3 seconds and come back completely confused. I'll post again if this transmutes into something unreadable 🤣

@briankung Heh, did a similar one-liner this week, deep in a Covid-fever, only to have rubocop tell me off. I suspect future you will have a good chuckle at what past you got up to. :)