The Trunk: Kernel-ar.407.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-ar.407.mcz

commits-2
Andreas Raab uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ar.407.mcz

==================== Summary ====================

Name: Kernel-ar.407
Author: ar
Time: 24 February 2010, 3:03:06.161 pm
UUID: 7a8e9c26-6571-2e48-88b9-a31af15e914d
Ancestors: Kernel-ar.404, Kernel-ul.406

Merging Kernel-ar.404 and Kernel-ul.406

=============== Diff against Kernel-ar.404 ===============

Item was added:
+ ----- Method: BlockClosure>>cull:cull: (in category 'evaluating') -----
+ cull: firstArg cull: secondArg
+ "Activate the receiver, with two or less arguments."
+
+ numArgs >= 2 ifTrue: [ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!

Item was changed:
  ----- Method: Integer class>>readFrom:ifFail: (in category 'instance creation') -----
  readFrom: aStringOrStream ifFail: aBlock
  "Answer an instance of one of the concrete subclasses if Integer.
+ Initial plus or minus sign accepted.
+ Imbedded radix specifiers not allowed;  use Number class readFrom: for that.
- Initial minus sign accepted.
- Imbedded radix specifiers not allowed;  use Number
- class readFrom: for that.
  Execute aBlock if there are no digits."
 
+ ^(ExtendedNumberParser on: aStringOrStream) nextIntegerBase: 10 ifFail: aBlock!
- ^(SqNumberParser on: aStringOrStream) nextIntegerBase: 10 ifFail: aBlock!

Item was added:
+ ----- Method: BlockClosure>>cull:cull:cull:cull: (in category 'evaluating') -----
+ cull: firstArg cull: secondArg cull: thirdArg cull: fourthArg
+ "Activate the receiver, with four or less arguments."
+
+ numArgs >= 3 ifTrue: [
+ numArgs >= 4 ifTrue: [
+ ^self value: firstArg value: secondArg value: thirdArg value: fourthArg ].
+ ^self value: firstArg value: secondArg value: thirdArg ].
+ numArgs = 2 ifTrue: [ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!

Item was added:
+ ----- Method: BlockClosure>>cull:cull:cull: (in category 'evaluating') -----
+ cull: firstArg cull: secondArg cull: thirdArg
+ "Activate the receiver, with three or less arguments."
+
+ numArgs >= 2 ifTrue: [
+ numArgs >= 3 ifTrue: [ ^self value: firstArg value: secondArg value: thirdArg ].
+ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!

Item was changed:
  ----- Method: Number class>>readFrom: (in category 'instance creation') -----
  readFrom: stringOrStream
  "Answer a number as described on aStream.  The number may
  be any accepted Smalltalk literal Number format.
  It can include a leading radix specification, as in 16rFADE.
  It can as well be NaN, Infinity or -Infinity for conveniency.
  If stringOrStream does not start with a valid number description, fail."
 
+ ^(ExtendedNumberParser on: stringOrStream) nextNumber!
- ^(SqNumberParser on: stringOrStream) nextNumber!

Item was changed:
  ----- Method: Number class>>readFrom:ifFail: (in category 'instance creation') -----
  readFrom: stringOrStream ifFail: aBlock
  "Answer a number as described on aStream.  The number may
  be any accepted Smalltalk literal Number format.
  It can include a leading radix specification, as in 16rFADE.
  It can as well be NaN, Infinity or -Infinity for conveniency.
  If input does not represent a valid number, then execute fail block
  and leave the stream positioned before offending character"
 
+ ^(ExtendedNumberParser on: stringOrStream) failBlock: aBlock; nextNumber!
- ^(SqNumberParser on: stringOrStream) failBlock: aBlock; nextNumber!

Item was changed:
  ----- Method: Integer class>>readFrom:base: (in category 'instance creation') -----
  readFrom: aStringOrStream base: base
  "Answer an instance of one of the concrete subclasses if Integer.
+ Initial plus or minus sign accepted, and bases > 10 use letters A-Z.
+ Imbedded radix specifiers not allowed;  use Number class readFrom: for that.
- Initial minus sign accepted, and bases > 10 use letters A-Z.
- Imbedded radix specifiers not allowed;  use Number
- class readFrom: for that.
  Raise an Error if there are no digits."
 
+ ^(ExtendedNumberParser on: aStringOrStream) nextIntegerBase: base!
- ^(SqNumberParser on: aStringOrStream) nextIntegerBase: base!

Item was added:
+ ----- Method: BlockClosure>>cull: (in category 'evaluating') -----
+ cull: firstArg
+ "Activate the receiver, with one or zero arguments."
+
+ numArgs >= 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!

Item was removed:
- ----- Method: Number class>>readExactlyFrom: (in category 'instance creation') -----
- readExactlyFrom: stringOrStream
- "Answer a number as described on aStream. The number may
- include a leading radix specification, as in 16rFADE"
-
- ^(SqNumberParser on: stringOrStream) nextNumber!