{c{1/0} ?: 0}

This commit is contained in:
Reinhard Pointner 2013-02-06 03:00:44 +00:00
parent 1c8e1972b6
commit 75322276a9
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import java.util.regex.Pattern
// simplified switch/case pattern matching
Object.metaClass.match = { Map cases -> def val = delegate; cases.findResult { switch(val) { case it.key: return it.value} } }
def x(c) { try { c.call() } catch (Throwable e) { null } }
def c(c) { try { c.call() } catch (Throwable e) { null } }
/**