On Wed, Oct 8, 2014 at 5:39 PM, Marcus Denker <marcus.denker@inria.fr> wrote:
On 08 Oct 2014, at 17:35, Max Leske <maxleske@gmail.com> wrote:
Can you provide a simple test to execute?
[ :ctx | [ ctx atEnd ] whileTrue:[1+2 ] ] sourceNode
On 08.10.2014, at 16:46, Jan Kurš <kurs@iam.unibe.ch> wrote:
Hi,
I need to extract a source code from a block closure and I found
something strange:
[ :ctx | [ ctx atEnd ] ifTrue: [ ] ] . [ :ctx | [ ctx atEnd ] whileTrue:[ ] ].
Print of the first line returns: '[ :ctx | [ ctx atEnd ] ifTrue: [ ] ]'
Print of the second line returns: '[ ctx atEnd ]'
And honestly, I have no idea why. This behaviour was observed in Pharo3
and Pharo4.
Is there a way how to get a consistent result, i.e. '[ :ctx | [ ctx
atEnd ] whileTrue:[ ] ]' for a second line?
Thank you in advance!
Can you check https://pharo.fogbugz.com/f/cases/14284/fix-sourceNode-for-Blocks This solves the issue for Blocks... for contexts there are still problems, but this is another step...