Revert "Include kwargs definition in the generated method signatures and method calls"

This reverts commit 0188b1c289.

CI was broken by that.

https://buildkite.com/rails/rails/builds/63488
This commit is contained in:
Ryuta Kamizono 2019-09-06 21:35:14 +09:00
parent a43de73841
commit d0ba1aa986
1 changed files with 3 additions and 3 deletions

View File

@ -361,12 +361,12 @@ module ActiveModel
# and `send` if the given names cannot be compiled.
def define_proxy_call(include_private, mod, name, target, *extra)
defn = if NAME_COMPILABLE_REGEXP.match?(name)
"def #{name}(*args, **options)"
"def #{name}(*args)"
else
"define_method(:'#{name}') do |*args, **options|"
"define_method(:'#{name}') do |*args|"
end
extra = (extra.map!(&:inspect) << "*args, **options").join(", ")
extra = (extra.map!(&:inspect) << "*args").join(", ")
body = if CALL_COMPILABLE_REGEXP.match?(target)
"#{"self." unless include_private}#{target}(#{extra})"