Skip to content
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

Tests on Ruby 2.7.0: avoid warnings; add 2.7.0 to CI #248

Merged
merged 2 commits into from
Jan 7, 2020
Merged

Tests on Ruby 2.7.0: avoid warnings; add 2.7.0 to CI #248

merged 2 commits into from
Jan 7, 2020

Conversation

jylitalo
Copy link
Contributor

@jylitalo jylitalo commented Jan 7, 2020

Fixing tests to work with ruby 2.7.0 (also tested with ruby 2.6.3 and 2.5.1)

With current master, we stumble into following error messages on ruby 2.7.0:

[~/github/slop]% rake test                                                                   [master]
/Users/jylitalo/github/slop/test/types_test.rb:42: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Run options: --seed 59555

# Running:

/Users/jylitalo/github/slop/lib/slop/options.rb:32: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/parser.rb:13: warning: The called method `initialize' is defined here
/Users/jylitalo/github/slop/test/options_test.rb:124: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/options.rb:27: warning: The called method `initialize' is defined here
./Users/jylitalo/github/slop/test/options_test.rb:128: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/options.rb:27: warning: The called method `initialize' is defined here
./Users/jylitalo/github/slop/lib/slop/options.rb:85: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/options.rb:51: warning: The called method `on' is defined here
/Users/jylitalo/github/slop/lib/slop/options.rb:55: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/option.rb:30: warning: The called method `initialize' is defined here
.............................................................................../Users/jylitalo/github/slop/test/option_test.rb:5: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jylitalo/github/slop/lib/slop/option.rb:30: warning: The called method `initialize' is defined here
....

Finished in 0.014476s, 5871.7877 runs/s, 8151.4230 assertions/s.

85 runs, 118 assertions, 0 failures, 0 errors, 0 skips
[~/github/slop]%

Closes #247 - thanks for that!

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for maintaining a zero-warning state!

Add 2.7.0 to CI, with a cherry-picked commit from the PR @ankane offered yesterday. Thanks for that, you!

image

@olleolleolle olleolleolle changed the title Tests on Ruby 2.7.0 Tests on Ruby 2.7.0: avoid warnings Jan 7, 2020
@olleolleolle olleolleolle changed the title Tests on Ruby 2.7.0: avoid warnings Tests on Ruby 2.7.0: avoid warnings; add 2.7.0 to CI Jan 7, 2020
@olleolleolle olleolleolle merged commit 0f53030 into leejarvis:master Jan 7, 2020
@ankane
Copy link
Contributor

ankane commented Jan 7, 2020

Awesome, thank you both!

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 23, 2020
Update ruby-slop to 4.8.0.


v4.8.0 (2020-01-17)
-------------------

Features:
  * Add support for prefixing integer values with `+` character
  [#243](leejarvis/slop#243) (Juha Ylitalo)
  * Add support for parsing floats with scientific notation
  [#250](leejarvis/slop#250) (Hansuk Hong)

Maintenance:
  * Add 2.7.0 to CI and fix warnings
  [#248](leejarvis/slop#248) (Juha Ylitalo, Andrew Kane)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants