mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Merge branch 'master' into example-api
This commit is contained in:
commit
f71a8ac6a3
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ module Spectator::Mocks
|
|||
abstract def call(args : GenericArguments(T, NT), &original : -> RT) forall T, NT, RT
|
||||
|
||||
def call!(args : GenericArguments(T, NT), &original : -> RT) : RT forall T, NT, RT
|
||||
value = call(args, &original)
|
||||
value = call(args) { |*ya| yield *ya }
|
||||
if value.is_a?(RT)
|
||||
value.as(RT)
|
||||
else
|
||||
|
|
|
@ -84,7 +84,7 @@ module Spectator::Mocks
|
|||
end
|
||||
|
||||
{% if body && !body.is_a?(Nop) %}
|
||||
%method({{args.splat}}) { {{original}} { |*%ya| yield *%ya } }
|
||||
%method({{args.splat}}) { |*%ya| yield *%ya }
|
||||
{% else %}
|
||||
{{original}} do |*%yield_args|
|
||||
yield *%yield_args
|
||||
|
|
Loading…
Reference in a new issue