From 75322276a9da41d3748dad908330bf9dff57a143 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 6 Feb 2013 03:00:44 +0000 Subject: [PATCH] {c{1/0} ?: 0} --- .../net/sourceforge/filebot/format/ExpressionFormat.lib.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index 5b093897..125145e3 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy +++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy @@ -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 } } /**