The code would look like this: [ | file | file := StandardFileStream forceNewFileNamed: âfooâ. file nextPutAll: âbarâ ] ensure: [ file close ]. Why that is considered bad practice however, I canât tell.
On 29.11.2014, at 23:01, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
As the class of this rule is named RBFileBlocksRule, I guess it comes from some practice used when working with files. Iâm not a file guru, but maybe others can tell more.
Stef, as you are working on rules, can we merge category and group of the rule? I understand that one was added later by Manifest, but it is in the Pharo core anywayâ¦
Uko
On 29 Nov 2014, at 21:41, stepharo <stepharo@free.fr> wrote:
Hi guys
I'm revisiting all the RB rule and I'm puzzled by this one.
Checks assignment to a variable that is the first statement inside the value block that is also used in the unwind block.
[| `@temps | `var := `@object. `@.statements] ensure: [`var `@messages: `@args]
Does anybody have an idea?
Stef