Closed olleolleolle closed 1 year ago
@olleolleolle Thanks for the heads up! Sounds like you have been bitten by fallout from this in the past. I haven't, so this could be a good a learning opportunity for me.
So, help me to understand... what is the potential issue avoided by this PR? I'm guessing that YAML interprets 3.0
as a float, which then gets converted to an integer, which then gets converted to the string "3"
when its passed to RVM? And, ultimately, we want to pass the string "3.0"
to RVM? Therefore, preempt this whole conversion SNAFU and use the quotes to force string time from the get go?
@botandrose In the case where the version specifier is glued in to a longer filename, or other configuration, later, that would turn into "the wrong string".
In your use-case, right now, it probably has no effect.
Speculative failure mode:
3.0
=> "3" => "rvm picks Ruby 3.1"@olleolleolle Ah, I see! Very interesting. We could verify this, then, by getting Travis to test with 2.0
in the RVM matrix, and see whether it attempts Ruby 2.0 or Ruby 2.7! I'll give this a go and report back.
@olleolleolle Hmm, looks like - 2.0
is correctly interpreted as Ruby 2.0.x, not Ruby 2.x, as feared, so maybe this isn't an issue? What do you think? Have you run into this before? Can you get it to fail in the described way?
https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/61
@botandrose I have only seen it fail hard on GitHub Action YAML
@olleolleolle Thanks for submitting this! We stopped using Travis CI and moved to GitHub Actions for CI. So I'm closing this. 👍🏼
YAML is hard. This change avoids a potential issue, and makes the change to all of the rvm list elements, to encourage readers to keep quoting these.