Box brackets in Ruby class declarations

If you’ve ever used Rails, you’ll almost certainly have created a database migration and seen the below syntax in the class declaration: class CreateUserTable < ActiveRecord :: Migration [ 7.1 ] def change # ... end end I’d never understood how the [7.1] in the superclass definition worked, and never really questioned it to be honest. I thought it was a fancy Ruby language feature that I didn’t…