Twiddle-wakka (Yes, that's a real thing)
Drew Bragg

Drew Bragg @drbragg

About: Full Stack Dev && Single Dad && Board Game Geek && Hockey Player

Location:
Warrington, PA
Joined:
Feb 8, 2018

Twiddle-wakka (Yes, that's a real thing)

Publish Date: Oct 18 '19
9 3

You may or may not know that Ruby has a pessimistic operator:

~>
Enter fullscreen mode Exit fullscreen mode

It's actually a pretty cool little thing used in Gemfiles to specify a version range.

gem 'rails', '~> 5.2.1'
gem 'devise', '~> 4.6'
gem 'puma', '~> 3'
Enter fullscreen mode Exit fullscreen mode

is the same as specifying:

gem 'rails', '>= 5.2.1', '< 5.3.0'
gem 'devise', '>= 4.6.0', '< 5.0'
gem 'puma', '>= 3.0', '< 4.0'
Enter fullscreen mode Exit fullscreen mode

But what is even better about it is it's name. ~> is called a twiddle-wakka

I hope you laughed as much at this as I did.

Happy Friday!

Comments 3 total

Add comment