From: David Gageot Date: Sat, 29 Sep 2012 12:15:21 +0000 (+0200) Subject: Shorter code X-Git-Tag: 3.3~166 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa5b016978a99f32fdcb249e8325aea41d88f9be;p=sonarqube.git Shorter code --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb index 81e74632ca9..56735bef90e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb @@ -46,12 +46,10 @@ class Api::Utils end def self.is_regexp?(s) - begin - Regexp.new(s) - true - rescue - false - end + Regexp.new(s) + true + rescue + false end def self.markdown_to_html(markdown)