Redundant begin: do not report if there is an inner handler

fixes #56
This commit is contained in:
Vitalii Elenhaupt 2018-05-24 22:58:58 +03:00 committed by V. Elenhaupt
parent 3e099e9afc
commit 3887da1438
2 changed files with 7 additions and 3 deletions

View file

@ -153,7 +153,7 @@ module Ameba::Rule
subject.catch(s).should_not be_valid
end
it "fails if there is an inner redundant block" do
it "doesn't report if there is an inner redundant block" do
s = Source.new %q(
def method
begin
@ -164,7 +164,7 @@ module Ameba::Rule
rescue
end
)
subject.catch(s).should_not be_valid
subject.catch(s).should be_valid
end
it "fails if there is a redundant block with yield" do