mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
parent
fde321f7e6
commit
6b56c87e78
5 changed files with 55 additions and 1 deletions
|
@ -151,6 +151,16 @@ module Ameba::Rule::Lint
|
|||
subject.catch(source).should be_valid
|
||||
end
|
||||
|
||||
it "does not report if argument shadows an ivar assignment" do
|
||||
s = Source.new %(
|
||||
def bar(@foo)
|
||||
@foo.try do |foo|
|
||||
end
|
||||
end
|
||||
)
|
||||
subject.catch(s).should be_valid
|
||||
end
|
||||
|
||||
it "reports rule, location and message" do
|
||||
source = Source.new %(
|
||||
foo = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue