mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
RedundantStringCoercion: do not report to_s with named args
closes #160
This commit is contained in:
parent
3448de30da
commit
7f501a1df5
2 changed files with 12 additions and 1 deletions
|
@ -66,6 +66,13 @@ module Ameba::Rule::Lint
|
|||
subject.catch(s).should be_valid
|
||||
end
|
||||
|
||||
it "doesn't report if Object#to_s is called with named args" do
|
||||
s = Source.new %q(
|
||||
"0x#{250.to_s base: 16}"
|
||||
)
|
||||
subject.catch(s).should be_valid
|
||||
end
|
||||
|
||||
it "reports rule, location and message" do
|
||||
s = Source.new %q(
|
||||
"Hello, #{name1.to_s}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue