Fix argument capture

Fix issue added by 8959d28b38
This commit is contained in:
Michael Miller 2022-10-23 22:04:28 -06:00
parent c77da67341
commit a31ffe3fa3
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
3 changed files with 3 additions and 3 deletions

View file

@ -184,7 +184,7 @@ module Spectator
# Handle all methods but only respond to configured messages.
# Raises an `UnexpectedMessage` error for non-configures messages.
macro method_missing(call)
args = ::Spectator::Arguments.build({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
args = ::Spectator::Arguments.capture({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
call = ::Spectator::MethodCall.new({{call.name.symbolize}}, args)
_spectator_record_call(call)

View file

@ -53,7 +53,7 @@ module Spectator
# Handles all messages.
macro method_missing(call)
# Capture information about the call.
%args = ::Spectator::Arguments.build({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
%args = ::Spectator::Arguments.capture({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
%call = ::Spectator::MethodCall.new({{call.name.symbolize}}, %args)
_spectator_record_call(%call)

View file

@ -52,7 +52,7 @@ module Spectator
# Returns stubbed values if available, otherwise delegates to `#_spectator_abstract_stub_fallback`.
macro method_missing(call)
# Capture information about the call.
%args = ::Spectator::Arguments.build({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
%args = ::Spectator::Arguments.capture({{call.args.splat(", ")}}{{call.named_args.splat if call.named_args}})
%call = ::Spectator::MethodCall.new({{call.name.symbolize}}, %args)
_spectator_record_call(%call)