You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RBPatternBlockNode >> #createBlockFor: creates the closure in the way source evaluate and that makes the closure bind self with nil. And that breaks certain usage that expects self to be an instance of RBPatternBlockNode.
This is an example that simply breaks:
| tree rewriter |
tree := RBParser parseMethod: 'DoIt ^ [:proxy | proxy at: #oldSelector. ]'.
rewriter := RBParseTreeRewriter new.
rewriter
replace: ('`#oldSelector `{:node | node value isSymbol and: [node value matchesRegex: ''.*oldSelector.*''] }')
with: ('`{RBLiteralNode value: (`#oldSelector value copyReplaceAll: ''oldSelector'' with: ''newSelector'') asSymbol }').
rewriter executeTree: tree.
rewriter tree newSource
The text was updated successfully, but these errors were encountered:
RBPatternBlockNode >> #createBlockFor:
creates the closure in the waysource evaluate
and that makes the closure bindself
withnil
. And that breaks certain usage that expectsself
to be an instance ofRBPatternBlockNode
.This is an example that simply breaks:
The text was updated successfully, but these errors were encountered: