Status: New Owner: ---- New issue 3685 by ya...@rogers.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 Pharo core version: Pharo1.2rc2 Latest update: #12324 In Pharo1.1 the instance variables could be passed as an array. See attached testcase, or, for example: SomeClass createUserSubclass: 'SomeSubclass' instVarNames: #(id varOne varTwo) categoryName: 'Test'. The code change here, looks to be the cause: ClassBuilder>>name: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category unsafe: unsafe < instVars := instVarString subStrings: ' '. < classVars := (classVarString subStrings: ' ') collect: [ :x | x asSymbol ]. "Validate the proposed name" --
instVars := Scanner new scanFieldNames: instVarString. classVars := (Scanner new scanFieldNames: classVarString) collect: [ :x | x asSymbol ]. "Validate the proposed name"
This issue came up in some code that was originally derived from some GemStone code. Maybe it was never intended that instVarNames could be passed in as an array. I've changed my code to pass an instVarString, but I thought I'd mention the changed behaviour here. Attachments: ClassBuilderFormatTests-testSubclassWithInstanceVariablesArray.st 565 bytes