Skip to content

raise ruby version requirement to 2.7.4 #87

Closed
@UiP9AV6Y

Description

@UiP9AV6Y

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions