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

Fix failing stdlib_test with Ruby 3 keyword argument #167

Merged
merged 2 commits into from Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ruby/signature/test/hook.rb
Expand Up @@ -289,7 +289,7 @@ def delegation(name, method_types, method_name)
end

result
end
end.ruby2_keywords
end

def verify(instance_method: nil, singleton_method: nil, types:)
Expand Down
2 changes: 2 additions & 0 deletions test/ruby/signature/test_test.rb
Expand Up @@ -3,6 +3,8 @@
require "ruby/signature/test"
require "logger"

return unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7.0')
Copy link
Member Author

Choose a reason for hiding this comment

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

It skips test for Ruby::Signature::Test:Hook if the Ruby runtime version is less than 2.7.

We also use ruby2_keywords gem to apply the polyfill instead of the skipping, but it needs ruby/ruby2_keywords#3.


class Ruby::Signature::TestTest < Minitest::Test
include TestHelper

Expand Down