mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use previous_def if method was defined in class
This commit is contained in:
parent
a0537484f4
commit
83ab5f56f0
1 changed files with 3 additions and 1 deletions
|
@ -59,8 +59,10 @@ module Spectator::Mocks
|
|||
original = if (name == :new.id && receiver == "self.".id) ||
|
||||
(t.superclass && t.superclass.has_method?(name) && !t.overrides?(t.superclass, name))
|
||||
:super
|
||||
else
|
||||
elsif t.has_method?(name)
|
||||
:previous_def
|
||||
else
|
||||
"::#{name}"
|
||||
end.id
|
||||
%}
|
||||
|
||||
|
|
Loading…
Reference in a new issue