diff -r 382d34e96340 -r 6d5f0280a7c7 Block.st --- a/Block.st Fri Jun 05 18:08:35 2015 +0200 +++ b/Block.st Fri Jun 05 18:08:43 2015 +0200 @@ -537,24 +537,24 @@ |numArgs| - numArgs := handlerBlock isBlock ifTrue:[handlerBlock numArgs] ifFalse:[0]. + numArgs := handlerBlock isBlock ifTrue:[handlerBlock argumentCount] ifFalse:[0]. numArgs == 1 ifTrue:[ - ^ self on:Error do:handlerBlock + ^ self on:Error do:handlerBlock ]. ^ self - on:Error - do:[:ex | - |errString errReceiver| - - numArgs == 0 ifTrue:[ - ex return:handlerBlock value - ] ifFalse:[ - errString := ex description. - errReceiver := ex suspendedContext receiver. - ex return:(handlerBlock value:errString value:errReceiver) - ]. - ] + on:Error + do:[:ex | + |errString errReceiver| + + numArgs == 0 ifTrue:[ + ex return:handlerBlock value + ] ifFalse:[ + errString := ex description. + errReceiver := ex suspendedContext receiver. + ex return:(handlerBlock value:errString value:errReceiver) + ]. + ] " |a| @@ -742,7 +742,7 @@ !Block methodsFor:'compatibility-Cola & Pepsi'! arity - ^ self numArgs + ^ self argumentCount ! ! !Block methodsFor:'conversion'! @@ -2556,10 +2556,10 @@ "repeat the receiver n times - similar to timesRepeat, but optionally passes the loop counter as argument" - self numArgs == 0 ifTrue:[ - n timesRepeat:self + self argumentCount == 0 ifTrue:[ + n timesRepeat:self ] ifFalse:[ - 1 to:n do:self + 1 to:n do:self ]. " @@ -3234,11 +3234,11 @@ !Block class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.212 2015-05-05 12:41:29 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.213 2015-06-05 16:08:43 stefan Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.212 2015-05-05 12:41:29 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.213 2015-06-05 16:08:43 stefan Exp $' ! !