How to get temp names of BlockClosure
Oct. 17, 2011
2:57 p.m.
I'm trying to learn how to get temp names from a BlockClosure. Well, I try to be able to treat BlockClosures the same way than CompileMethod when it comes to arguments. I can do [:a :b :c| ] asContext tempNames #('a' 'b' 'c') but I'm not sure if this is the best to go. While looking I found [:a :b :c| ] method tempNames #('[a' 'b' 'c]') For me there are two errors. The obvious one is that the first element is [a instead of a (it splits the string "[a b c]" by spaces). The second point is that "method" is defined as "outerContext method" and I don't understand why it is visible as temps there. It gets the information from the method trailer. Is this a reminiscent from the pre-closure times? thanks, Norbert
5401
Age (days ago)
5401
Last active (days ago)
0 comments
1 participants
participants (1)
-
Norbert Hartl