Skip to content

raise ruby version requirement to 2.7.4 #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
UiP9AV6Y opened this issue Oct 23, 2023 · 2 comments · Fixed by #94
Closed

raise ruby version requirement to 2.7.4 #87

UiP9AV6Y opened this issue Oct 23, 2023 · 2 comments · Fixed by #94

Comments

@UiP9AV6Y
Copy link

the gemspec lists the minimum requirement for the gem release 4.0.0 as 2.7.0

the dynamic matcher implementation makes use of a feature introduced with 2.7.0 (according to the changelog)

however: loading the gem with ruby 2.7.0 leads to a syntax
error:

$ ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
$ gem install --silent --version ">7" puppet
$ gem install --silent --version "
>4" rspec-puppet
$ ruby -e "require 'rspec-puppet'"
...
/usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in require': /usr/local/bundle/gems/rspec-puppet-4.0.0/lib/rspec-puppet/matchers/dynamic_matchers.rb:29: syntax error, unexpected (... (SyntaxError) ... def method_missing(method, ...) ... ^~~ /usr/local/bundle/gems/rspec-puppet-4.0.0/lib/rspec-puppet/matchers/dynamic_matchers.rb:30: syntax error, unexpected ')' ...:CreateGeneric.new(method, ...) if method == :be_valid_type ... ^ /usr/local/bundle/gems/rspec-puppet-4.0.0/lib/rspec-puppet/matchers/dynamic_matchers.rb:35: syntax error, unexpected end', expecting end-of-input

whereas loading the gem with ruby 2.7.4 succeeds:

$ ruby --version
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
$ gem install --silent --version ">7" puppet
$ gem install --silent --version "
>4" rspec-puppet
$ ruby -e "require 'rspec-puppet'"
$ echo $?
0

i came across this issues, as ruby 2.7.0 is the version shipped with Ubuntu 20.04 (EOL in 2025)

ekohl added a commit to ekohl/rspec-puppet that referenced this issue Oct 24, 2023
@ekohl
Copy link

ekohl commented Oct 24, 2023

Looks like this was introduced in a16dc28. I've opened #88 to see if it can be reproduced by testing on 2.7.0 instead of 2.7.latest.

@jordanbreen28
Copy link

jordanbreen28 commented Dec 5, 2023

Fixed and released as part of v4.0.2.
gems will be published shortly
Thanks both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants