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 kwargs delegation in PerThreadRegistry#method_missing #42954

Merged
merged 1 commit into from Aug 6, 2021
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
1 change: 1 addition & 0 deletions activesupport/lib/active_support/per_thread_registry.rb
Expand Up @@ -56,5 +56,6 @@ def method_missing(name, *args, &block)

send(name, *args, &block)
end
ruby2_keywords(:method_missing)
end
end
15 changes: 15 additions & 0 deletions activesupport/test/per_thread_registry_test.rb
@@ -0,0 +1,15 @@
# frozen_string_literal: true

require_relative "abstract_unit"

class PerThreadRegistryTest < ActiveSupport::TestCase
class TestRegistry
extend ActiveSupport::PerThreadRegistry

def foo(x:); x; end
end

def test_method_missing_with_kwargs
assert_equal 1, TestRegistry.foo(x: 1)
end
end