"Delegation Challenge in Ruby 2.7" (a.k.a. compatibility ain't easy.)

Came across this article about upcoming changes to Ruby in 2.7 and 3.0:

Worth a read for what’s coming down the line.

3 Likes

I think I only have one piece of code I need to check for this. If I remember correctly I made a generic tool superclass (generic tool functionality like checking if a tool is active and getting the command state etc) that has an activate method that also creates an instance and pass along all parameters to the constructor. Have to look into it.

  1. Speaking of warnings File.exists?

  2. Anyone want to test Ruby 2.6 or 2.7 (or 3.0 after Christmas) on Windows, I can write up directions. After the initial setup, one ps1 file will update to a new Ruby. Initial setup does make it Ruby major/minor version specific, so moving from 2.7 to 3.0 will require editing two files. Lastly, plugins are shared between the standard 2019 install and the modified one.

1 Like

While working on #2 from above, I noticed an issue with Ruby 2.7.

We can write hashes as:

{:key => :value}
- or -
{key: :value}

If a method is expecting a hash parameter, you need to use :key => :value. If it’s expecting a kwarg, use key: :value