mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Remove redundant check and add a few more test cases
This commit is contained in:
parent
a9d1b17deb
commit
694c41650c
2 changed files with 4 additions and 1 deletions
|
@ -8,8 +8,12 @@ module Ameba::Rule::Style
|
|||
source = Source.new %(
|
||||
(1..3).any?(&.odd?)
|
||||
(1..3).join('.', &.to_s)
|
||||
(1..3).each_with_index { |i, idx| i * idx }
|
||||
(1..3).map { |i| typeof(i) }
|
||||
(1..3).map { |i| i || 0 }
|
||||
(1..3).map { |i| :foo }
|
||||
(1..3).map { |i| :foo.to_s.split.join('.') }
|
||||
(1..3).map { :foo }
|
||||
)
|
||||
subject.catch(source).should be_valid
|
||||
end
|
||||
|
|
|
@ -210,7 +210,6 @@ module Ameba::Rule::Style
|
|||
while obj.is_a?(Crystal::Call)
|
||||
obj = obj.obj
|
||||
end
|
||||
return unless obj.is_a?(Crystal::Var)
|
||||
|
||||
# only calls with a first argument used as a receiver are the valid game
|
||||
return unless obj == arg
|
||||
|
|
Loading…
Reference in a new issue