I guess there's infinite recursion in Array's printing method too...
An Array containing itself? Obviously that's a rare structure the system has never dealt with.
Do you think there'll be any other traversing methods that might be affected?
On Mon, Feb 3, 2014 at 7:48 AM, commits@source.squeak.org wrote:
A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-ul.564.mcz
==================== Summary ====================
Name: Collections-ul.564 Author: ul Time: 3 February 2014, 2:35:36.802 pm UUID: 4b9a37ef-df86-40a0-a0dd-8e8b2c04d4ed Ancestors: Collections-ul.563
Make sure that Array >> #isLiteral won't get into an infinite recursion, even if the receiver has an recursive structure.
=============== Diff against Collections-ul.563 ===============
Item was changed: ----- Method: Array>>isLiteral (in category 'testing') ----- isLiteral
^self class == Array and: [
self isLiteralIfContainedBy: IdentitySet new ]!
^self class == Array and: [self allSatisfy: [:each | each isLiteral]]!
Item was added:
- ----- Method: Array>>isLiteralIfContainedBy: (in category 'testing') -----
- isLiteralIfContainedBy: parents
" Answer whether the receiver has a literal text form recognized by the compiler. Precondition: the receiver is an instance of Array. "
(parents includes: self) ifTrue: [ ^false ].
parents add: self.
1 to: self size do: [ :index |
| element |
element := self at: index.
(element class == Array
ifTrue: [ element isLiteralIfContainedBy: parents ]
ifFalse: [ element isLiteral ]) ifFalse: [ ^false ] ].
parents remove: self.
^true!
On Mon, 3 Feb 2014, Chris Muller wrote:
I guess there's infinite recursion in Array's printing method too...
An Array containing itself? Obviously that's a rare structure the system has never dealt with.
Not really. We already have #shouldBePrintedAsLiteral which handles recursive array structures the same way the code I just uploaded does.
And we have Object >> #printString, which limits the length of the returned string to 50000 characters.
Do you think there'll be any other traversing methods that might be affected?
Definitely. One example is #includes:.
Levente
On Mon, Feb 3, 2014 at 7:48 AM, commits@source.squeak.org wrote:
A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-ul.564.mcz
==================== Summary ====================
Name: Collections-ul.564 Author: ul Time: 3 February 2014, 2:35:36.802 pm UUID: 4b9a37ef-df86-40a0-a0dd-8e8b2c04d4ed Ancestors: Collections-ul.563
Make sure that Array >> #isLiteral won't get into an infinite recursion, even if the receiver has an recursive structure.
=============== Diff against Collections-ul.563 ===============
Item was changed: ----- Method: Array>>isLiteral (in category 'testing') ----- isLiteral
^self class == Array and: [
self isLiteralIfContainedBy: IdentitySet new ]!
^self class == Array and: [self allSatisfy: [:each | each isLiteral]]!
Item was added:
- ----- Method: Array>>isLiteralIfContainedBy: (in category 'testing') -----
- isLiteralIfContainedBy: parents
" Answer whether the receiver has a literal text form recognized by the compiler. Precondition: the receiver is an instance of Array. "
(parents includes: self) ifTrue: [ ^false ].
parents add: self.
1 to: self size do: [ :index |
| element |
element := self at: index.
(element class == Array
ifTrue: [ element isLiteralIfContainedBy: parents ]
ifFalse: [ element isLiteral ]) ifFalse: [ ^false ] ].
parents remove: self.
^true!
Hi Levente
Beta version here:
https://github.com/gettimothy/postgresV3Help
I will contribute more as I get time.
cheers,
t
Hi Timothy,
I'll add it to the squeaksource repository if it's okay with you?
Levente
On Sun, 11 Mar 2018, gettimothy wrote:
Hi Levente
Beta version here:
https://github.com/gettimothy/postgresV3Help
I will contribute more as I get time.
cheers,
t
Yes! Please. Thank you very much.
---- On Sun, 11 Mar 2018 16:30:20 -0400 Levente Uzonyi <leves@caesar.elte.hu> wrote ----
Hi Timothy,
I'll add it to the squeaksource repository if it's okay with you?
Levente
On Sun, 11 Mar 2018, gettimothy wrote:
> > Hi Levente > > Beta version here: > > https://github.com/gettimothy/postgresV3Help > > > I will contribute more as I get time. > > cheers, > > t > > > >
squeak-dev@lists.squeakfoundation.org