From 404a9bc88be538769c6c80b3b31f39a6582991d2 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 13 Feb 2017 09:52:10 -0800 Subject: fix specs: RedundantReturn, RedundantSelf, RedundantBegin department of redundancy department Signed-off-by: Lamont Granquist --- lib/chef/provider/file.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/chef/provider/file.rb') diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index f77986fa03..d87004d543 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -312,11 +312,9 @@ class Chef # like real_file? that follows (sane) symlinks def symlink_to_real_file?(path) - begin - real_file?(::File.realpath(path)) - rescue Errno::ELOOP, Errno::ENOENT - false - end + real_file?(::File.realpath(path)) + rescue Errno::ELOOP, Errno::ENOENT + false end # Similar to File.exist?, but also returns true in the case that the -- cgit v1.2.1