[squeak-dev] Fwd: [SeasideSt/Grease] GRIntervalTest >> #testSorted assumes new collection (#95)

Tobias Pape Das.Linux at gmx.de
Tue Aug 27 13:04:27 UTC 2019



> Begin forwarded message:
> 
> From: Philippe Marschall <notifications at github.com>
> Subject: [SeasideSt/Grease] GRIntervalTest >> #testSorted assumes new collection (#95)
> Date: 27. August 2019 um 14:55:35 MESZ
> To: SeasideSt/Grease <Grease at noreply.github.com>
> Cc: Subscribed <subscribed at noreply.github.com>
> Reply-To: SeasideSt/Grease <reply+AAA5D32XUYEK5HDHSCXBQ3N3OJUNPEVBNHHBZ5E5ZI at reply.github.com>
> Delivered-To: tobias at netshed.de
> 
> GRIntervalTest >> #testSorted assumes new a collection is returned. This is no longer true with the latest Squeak.
> 

I just looked, all #sorted return a copy, except Interval:

"
sorted
	"an Interval is already sorted"
	step < 0 ifTrue: [^self reversed].
	^self
"

Shouldn't that rather be this?

"
sorted
	"an Interval is already sorted"
	step < 0 ifTrue: [^self reversed].
	^self copy
"


Best regards
	-Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190827/37a6a624/attachment.html>


More information about the Squeak-dev mailing list