From fa5b016978a99f32fdcb249e8325aea41d88f9be Mon Sep 17 00:00:00 2001 From: David Gageot Date: Sat, 29 Sep 2012 14:15:21 +0200 Subject: [PATCH] Shorter code --- .../src/main/webapp/WEB-INF/app/models/api/utils.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) -- 2.39.5