On 11 Jan 2017, at 09:33, Torsten Bergmann <astares@gmx.de> wrote:
I've found it:
Loading Pastell into latest image 60342 using:
Metacello new smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo50'; configuration: 'Pastell'; version: #stable; load.
the tests are green now.
And it is also not a difference between Mac and Windows
When the method looks like
testDNU | xml document html testElements | xml := '<html><testElement/><testElement/></html>'. document := XMLDOMParser parse: xml readStream. html := document html. testElements := html testElement. self assert: testElements size = 2. self assert: testElements first name = #testElement. self assert: testElements last name = #testElement
it works
When I exchange the tag "testElement" agains "head" it does not work as I reported in my last mail:
testDNU | xml document html testElements | xml := '<html><head/><head/></html>'. document := XMLDOMParser parse: xml readStream. html := document html. testElements := html head. self assert: testElements size = 2. self assert: testElements first name = #head. self assert: testElements last name = #head
Now the assertions fail although only the tag name/message changed.
Reason is simple: there is a #head method in Object from Morphic just returning self. For whatever reason but this makes the difference.
Lesson learned: take care with DNU tricks ;)
Sorry for the noise!
That's not noise, it is an interesting lesson ! But why the hell would there be a Object>>#head ?! IMHO such general selectors at this level should not be used unless there is a very good reason to do so.
Bye T.