mirror of https://github.com/rails/rails
Merge pull request #42954 from kamipo/fix_per_thread_registry
Fix kwargs delegation in `PerThreadRegistry#method_missing`
This commit is contained in:
commit
58dc8b634b
|
@ -56,5 +56,6 @@ module ActiveSupport
|
|||
|
||||
send(name, *args, &block)
|
||||
end
|
||||
ruby2_keywords(:method_missing)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue