Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 14 files changed
  • 0 commit comments
  • 1 contributor
View
9 kernel/Array.st
@@ -62,10 +62,11 @@ and general access behavior from SequenceableCollection.'>
<category: 'printing'>
aStream nextPut: $(.
- self do:
- [:elt |
- elt printOn: aStream.
- aStream space].
+ self
+ do: [:element |
+ element printOn: aStream]
+ separatedBy: [
+ aStream space].
aStream nextPut: $)
]
View
6 kernel/Bag.st
@@ -194,16 +194,18 @@ twice, then I will report that that element has been stored twice.'>
"Put on aStream a representation of the receiver"
<category: 'printing'>
+ | first |
aStream
nextPutAll: self class storeString;
nextPut: $(.
+ first := true.
contents keysAndValuesDo:
[:key :count |
+ first ifTrue: [first := false] ifFalse: [aStream space].
aStream
print: key;
nextPut: $:;
- print: count;
- space].
+ print: count].
aStream nextPut: $)
]
View
14 kernel/CharArray.st
@@ -648,15 +648,17 @@ accessing and manipulation methods for strings.'>
<category: 'converting'>
| stream ch |
stream := ReadStream on: self.
-
+
+ stream peekFor: $-.
+
[stream atEnd ifTrue: [^true].
(ch := stream next) isDigit] whileTrue: [].
+
ch = $. ifFalse: [^false].
-
- [ch := stream next.
- ch isDigit ifFalse: [^false].
- stream atEnd]
- whileFalse.
+
+ [stream atEnd]
+ whileFalse: [stream next isDigit ifFalse: [^false]].
+
^true
]
View
14 kernel/Collection.st
@@ -604,12 +604,14 @@ of objects.'>
"Print a representation of the receiver on aStream"
<category: 'printing'>
- aStream nextPutAll: self class storeString.
- aStream nextPutAll: ' ('.
- self do:
- [:element |
- element printOn: aStream.
- aStream space].
+ aStream
+ nextPutAll: self class storeString;
+ nextPutAll: ' ('.
+ self
+ do: [:element |
+ element printOn: aStream]
+ separatedBy: [
+ aStream space].
aStream nextPut: $)
]
View
10 tests/arrays.ok
@@ -95,18 +95,18 @@ Execution begins...
returned value is nil
Execution begins...
-returned value is '(() )'
+returned value is '(())'
Execution begins...
-SortedCollection (8->1 12->1 4->2 7->2 5->3 6->3 9->8 )
+SortedCollection (8->1 12->1 4->2 7->2 5->3 6->3 9->8)
returned value is SortedCollection new: 10 "<0>"
Execution begins...
-(1 1 2 3 5 )
-(2 3 4 4 5 )
+(1 1 2 3 5)
+(2 3 4 4 5)
'aabce'
'bcdde'
returned value is 'bcdde'
Execution begins...
-returned value is 'SortedCollection (0 1 2 3 4 5 6 7 8 )'
+returned value is 'SortedCollection (0 1 2 3 4 5 6 7 8)'
View
4 tests/cobjects.ok
@@ -116,7 +116,7 @@ Execution begins...
8
4369
8738
-ByteArray (0 0 17 17 34 34 51 51 )
+ByteArray (0 0 17 17 34 34 51 51)
error: Invalid argument 8: offset out of range
returned value is nil
@@ -142,7 +142,7 @@ CInt(0 0 0 0 0 0 0 0 @ 8)
returned value is nil
Execution begins...
-ByteArray (0 0 0 0 65 0 0 0 )
+ByteArray (0 0 0 0 65 0 0 0)
returned value is ByteArray new: 8 "<0>"
Execution begins...
View
2  tests/compiler.ok
@@ -136,7 +136,7 @@ returned value is A
Execution begins...
returned value is #A
-({Subspace.B} )
+({Subspace.B})
Execution begins...
returned value is VariableBinding new "<0>"
View
24 tests/floatmath.ok
@@ -222,27 +222,27 @@ Execution begins...
returned value is FloatQ
Execution begins...
-(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true )
-(-0.0 0.0 0.0 0.0 true -0.0 -0.0 true )
-(0.0 -0.0 -0.0 -0.0 true 0.0 0.0 true )
-(0.0 0.0 0.0 0.0 true 0.0 0.0 true )
+(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true)
+(-0.0 0.0 0.0 0.0 true -0.0 -0.0 true)
+(0.0 -0.0 -0.0 -0.0 true 0.0 0.0 true)
+(0.0 0.0 0.0 0.0 true 0.0 0.0 true)
returned value is Array new: 4 "<0>"
Execution begins...
-(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true )
-(-0.0 0.0 0.0 0.0 true -0.0 -0.0 true )
-(0.0 -0.0 -0.0 -0.0 true 0.0 0.0 true )
-(0.0 0.0 0.0 0.0 true 0.0 0.0 true )
+(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true)
+(-0.0 0.0 0.0 0.0 true -0.0 -0.0 true)
+(0.0 -0.0 -0.0 -0.0 true 0.0 0.0 true)
+(0.0 0.0 0.0 0.0 true 0.0 0.0 true)
returned value is Array new: 4 "<0>"
Execution begins...
-(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true )
-(0.0 0.0 0.0 0.0 true 0.0 0.0 true )
+(-0.0 -0.0 0.0 0.0 true 0.0 0.0 true)
+(0.0 0.0 0.0 0.0 true 0.0 0.0 true)
returned value is Array new: 2 "<0>"
Execution begins...
-(-0.0 0.0 true true true )
-(0.0 -0.0 true true true )
+(-0.0 0.0 true true true)
+(0.0 -0.0 true true true)
returned value is Array new: 2 "<0>"
Execution begins...
View
6 tests/geometry.ok
@@ -65,9 +65,9 @@ Execution begins...
50@250
120@120 corner: 200@200
100@300 corner: 300@400
-(120@50 corner: 200@120 50@50 corner: 120@200 )
-(100@20 corner: 300@300 20@20 corner: 100@400 300@20 corner: 400@400 )
-(120@20 corner: 260@120 120@240 corner: 260@400 20@20 corner: 120@400 260@20 corner: 400@400 )
+(120@50 corner: 200@120 50@50 corner: 120@200)
+(100@20 corner: 300@300 20@20 corner: 100@400 300@20 corner: 400@400)
+(120@20 corner: 260@120 120@240 corner: 260@400 20@20 corner: 120@400 260@20 corner: 400@400)
90@290 corner: 310@410
110@320 corner: 290@380
100@120 corner: 300@400
View
10 tests/getopt.ok
@@ -5,18 +5,18 @@ $B->#noArg
returned value is Getopt new "<0>"
Execution begins...
-SortedCollection ('l' 'lo' 'lon' 'long' )
+SortedCollection ('l' 'lo' 'lon' 'long')
'long'->#noArg
returned value is Getopt new "<0>"
Execution begins...
-SortedCollection ('longe' 'longer' 'longi' 'longis' 'longish' )
+SortedCollection ('longe' 'longer' 'longi' 'longis' 'longish')
'longer'->#noArg
'longish'->#noArg
returned value is Getopt new "<0>"
Execution begins...
-SortedCollection ('long' 'longe' 'longer' )
+SortedCollection ('long' 'longe' 'longer')
'long'->#noArg
'longer'->#noArg
returned value is Getopt new "<0>"
@@ -38,13 +38,13 @@ $b->#noArg
returned value is Getopt new "<0>"
Execution begins...
-SortedCollection ('l' 'lo' 'lon' 'long' )
+SortedCollection ('l' 'lo' 'lon' 'long')
$a->'long'
'long'->#noArg
returned value is Getopt new "<0>"
Execution begins...
-SortedCollection ('l' 'lo' 'lon' 'long' 'v' 've' 'ver' 'very' 'very-' 'very-l' 'very-lo' 'very-lon' 'very-long' )
+SortedCollection ('l' 'lo' 'lon' 'long' 'v' 've' 'ver' 'very' 'very-' 'very-l' 'very-lo' 'very-lon' 'very-long')
$a->'long'
'long'->#noArg
'very-long'->'long'
View
22 tests/mutate.ok
@@ -17,7 +17,7 @@ Execution begins...
returned value is true
Execution begins...
-(#key #value )->Set ()
+(#key #value)->Set ()
returned value is Association new "<0>"
Execution begins...
@@ -27,7 +27,7 @@ Execution begins...
returned value is true
Execution begins...
-(#a )->Set (#SystemExceptions )
+(#a)->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
@@ -37,7 +37,7 @@ Execution begins...
returned value is true
Execution begins...
-(#a )->Set (#SystemExceptions )
+(#a)->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
@@ -47,7 +47,7 @@ Execution begins...
returned value is true
Execution begins...
-(#key #value #a )->Set (#SystemExceptions )
+(#key #value #a)->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
@@ -57,14 +57,14 @@ Execution begins...
returned value is true
Execution begins...
-(#Foo )->()->Set (#SystemExceptions )
+(#Foo)->()->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
returned value is C
Execution begins...
-(#Foo )->(#key #value )->Set (#SystemExceptions )
+(#Foo)->(#key #value)->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
@@ -74,14 +74,14 @@ Execution begins...
returned value is true
Execution begins...
-#pointer->(#Foo )->()->Set (#SystemExceptions )
+#pointer->(#Foo)->()->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
returned value is C
Execution begins...
-#pointer->(#Foo )->(#key #value )->Set (#SystemExceptions )
+#pointer->(#Foo)->(#key #value)->Set (#SystemExceptions)
returned value is Association new "<0>"
Execution begins...
@@ -95,15 +95,15 @@ Smalltalk
returned value is SystemDictionary new: 512 "<0>"
Execution begins...
-(#a #b #c )
+(#a #b #c)
returned value is Array new: 3 "<0>"
Execution begins...
-(#a #d #b #c )
+(#a #d #b #c)
returned value is Array new: 4 "<0>"
Execution begins...
-(#a #d )
+(#a #d)
returned value is Array new: 2 "<0>"
Execution begins...
View
14 tests/objects.ok
@@ -10,13 +10,13 @@ Execution begins...
returned value is true
Execution begins...
-('abc' an Object nil nil 1 )
-('abc' an Object nil nil 1 )
-('abc' nil nil nil 1 )
-('abc' nil nil nil 1 )
-(true false true true true )
-(true true true true true )
-(true false true true true )
+('abc' an Object nil nil 1)
+('abc' an Object nil nil 1)
+('abc' nil nil nil 1)
+('abc' nil nil nil 1)
+(true false true true true)
+(true true true true true)
+(true false true true true)
returned value is Array new: 5 "<0>"
Execution begins...
View
4 tests/stcompiler.ok
@@ -32,8 +32,8 @@ Execution begins...
'okay'
'okay'
now I'm testing 'Cascading'
-(true false nil 53 $a ByteArray (1 2 3 ) (1 2 3 ) {Smalltalk.Association} #perform: #perform:with: '
-Arrays... and multi-line strings' )
+(true false nil 53 $a ByteArray (1 2 3) (1 2 3) {Smalltalk.Association} #perform: #perform:with: '
+Arrays... and multi-line strings')
and now blocks with parameters...
'okay'
[] in UndefinedObject>>executeStatements (a String:1)
View
12 tests/strings.ok
@@ -101,22 +101,22 @@ Execution begins...
returned value is 'xbxcx'
Execution begins...
-returned value is '('abc' 'def' )'
+returned value is '('abc' 'def')'
Execution begins...
-returned value is '('' 'abc' 'def' )'
+returned value is '('' 'abc' 'def')'
Execution begins...
-returned value is '('a' 'b' 'c' )'
+returned value is '('a' 'b' 'c')'
Execution begins...
-returned value is '('a' )'
+returned value is '('a')'
Execution begins...
-returned value is '('a' )'
+returned value is '('a')'
Execution begins...
-returned value is '('a' )'
+returned value is '('a')'
Execution begins...
returned value is 4

No commit comments for this range

Something went wrong with that request. Please try again.