1
0
Fork 0
mirror of https://github.com/ms-ati/docile synced 2023-03-27 23:21:52 -04:00

Fix specs on TruffleRuby 22.0.0.2

Appears that TruffleRuby 22.0.0.2 reports RUBY_VERSION of 3.0.2,
but the observed behavior when we pass a hash final argument to
a method taking splat and double-splat arguments appears to be
the prior behavior of Ruby versions before 3.0.0.
This commit is contained in:
Marc Siegel 2022-04-11 12:25:55 -04:00
parent b99a904129
commit e57f53321d

View file

@ -546,7 +546,8 @@ describe Docile do
it "correctly passes hash arguments" do
described_class.dsl_eval(dsl) { configure(1, { a: 1 }) }
if RUBY_VERSION >= "3.0.0"
# TruffleRuby 22.0.0.2 has RUBY_VERSION of 3.0.2, but behaves as 2.x
if RUBY_VERSION >= "3.0.0" && RUBY_ENGINE != "truffleruby"
expect(dsl.arguments).to eq [1, { a: 1 }]
expect(dsl.options).to eq({})
else