diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-13 09:52:10 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-13 09:52:10 -0800 |
commit | 404a9bc88be538769c6c80b3b31f39a6582991d2 (patch) | |
tree | 2f8795e5f64153440c22a522d669c235a627f289 /lib/chef/mixin/uris.rb | |
parent | b949a48acc21d4b64869bd7b834708d5232b1f2a (diff) | |
download | chef-404a9bc88be538769c6c80b3b31f39a6582991d2.tar.gz |
fix specs: RedundantReturn, RedundantSelf, RedundantBegin
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/mixin/uris.rb')
-rw-r--r-- | lib/chef/mixin/uris.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/chef/mixin/uris.rb b/lib/chef/mixin/uris.rb index 7dc04d662b..ea55eefd8f 100644 --- a/lib/chef/mixin/uris.rb +++ b/lib/chef/mixin/uris.rb @@ -31,12 +31,10 @@ class Chef end def as_uri(source) - begin - URI.parse(source) - rescue URI::InvalidURIError - Chef::Log.warn("#{source} was an invalid URI. Trying to escape invalid characters") - URI.parse(Addressable::URI.encode(source)) - end + URI.parse(source) + rescue URI::InvalidURIError + Chef::Log.warn("#{source} was an invalid URI. Trying to escape invalid characters") + URI.parse(Addressable::URI.encode(source)) end end |