* force proper return value for custom closure

This commit is contained in:
Reinhard Pointner 2012-08-27 11:21:11 +00:00
parent 41b95be589
commit 4fb02fe187
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ def _renameFunction(fn) {
if (fn instanceof String)
return StandardRenameAction.forName(fn)
if (fn instanceof Closure)
return [rename:fn as Closure, toString:{'CLOSURE'}] as RenameAction
return [rename:{ from, to -> def result = fn.call(from, to); result instanceof File ? result : to }, toString:{'CLOSURE'}] as RenameAction
return fn as RenameAction
}