2007-02-18 Stephen Compall * compiler/RBParseNodes.st: Fix off-by-one in RBMethodNode>>#primitiveSources when source is a FileSegment. --- orig/compiler/RBParseNodes.st +++ mod/compiler/RBParseNodes.st @@ -953,11 +953,13 @@ ^self arguments copyWith: self body! primitiveSources - | offset | + | sourceString offset | + self tags isEmpty ifTrue: [^#()]. + sourceString := self source asString. offset := self start - 1. ^self tags - collect: [:each | self source copyFrom: each first - offset - to: each last - offset]! + collect: [:each | sourceString copyFrom: each first - offset + to: each last - offset]! isBinary ^(self isUnary or: [self isKeyword]) not!