You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Values in Hash literals and keyword arguments can be omitted. [Feature #14579]
{x:, y:} is syntax sugar for {x: x, y: y}.
foo(x:, y:) is syntax sugar for foo(x: x, y: y).
This means that it's possible to install the timex_datalink_client gem on a version of Ruby that is too old, i.e. 3.0.6. When attempting to use the gem on 3.0.6, this exception is raised:
<internal:/home/elaine/.rbenv/versions/3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': /home/elaine/repos/timex_datalink_client/lib/timex_datalink_client.rb:127: syntax error, unexpected ',' (SyntaxError)
serial_device:,
^
from <internal:/home/elaine/.rbenv/versions/3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from examples/protocol_7/clear-data:10:in `<main>'
A minimum version of 3.1.0 should be set by adding this to the gemspec:
s.required_ruby_version=">= 3.1.0"
This will present a definitive error to the user if they attempt to install this gem on an older version:
timex_datalink_client-0.12.3 requires ruby version >= 3.1.0, which is incompatible with the current version, ruby 3.0.6p216
The text was updated successfully, but these errors were encountered:
Related to #316.
The gemspec doesn't specify a minimum Ruby version, and this lib uses omitted keyword arguments, which is a feature introduced in Ruby 3.1.0:
This means that it's possible to install the timex_datalink_client gem on a version of Ruby that is too old, i.e. 3.0.6. When attempting to use the gem on 3.0.6, this exception is raised:
A minimum version of 3.1.0 should be set by adding this to the gemspec:
This will present a definitive error to the user if they attempt to install this gem on an older version:
The text was updated successfully, but these errors were encountered: