While checking some packaging today, I noticed that the Kernel
package is dirty because Mondrian seems to override
I added ClassDescription>>numberOfLinesOfCode because there was not such support in
Pharo. Apparently, there is one. The Mondrian implementation of numberOfLinesOfCode can be
^ self methods inject: 5 into: [ :sum :compiledMethod |
(compiledMethod propertyValueAt: #numberOfLinesOfCode)
ifNil: [ compiledMethod
put: compiledMethod getSource lineCount ].
sum + (compiledMethod propertyValueAt: #numberOfLinesOfCode) ]
I am not sure I understand the purpose of the override. Caching? Why is there a 'self
methods inject: 5' at the beginning?
Because a class definition has 5 lines of code.
And, do we absolutely need this override? :)
Before it was just a non-overriden extension. It has changed now.
I committed Mondrian-AlexandreBergel.592
Alexandre Bergel http://www.bergel.eu