pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[RB] safeMethodNameFor: aClass basedOn: aString could be covered by some tests.

Open Ducasse opened this issue 3 years ago • 1 comments

In RBRefactoring.

Ducasse avatar Nov 09 '22 10:11 Ducasse

still valid

Ducasse avatar Nov 13 '23 09:11 Ducasse

I would like to take this one as my "First Issue" if that's OK.

clacker avatar Nov 30 '24 12:11 clacker

Thanks a lot!

Ducasse avatar Dec 03 '24 05:12 Ducasse

I think that the tests show that the logic of safeMethodNameFor:basedOn: is bogus. So this is good.

Because for binary selector it should not add the number at the end since these are not syntactically correct.

Here is what I would do. Either

check explicitly in safeMethodNameFor:basedOn: if the argument represents a binary selector (using isBinary) and in the case just return it. rename safeMethodNameFor:basedOn: into safeAccessorNameFor:basedOn: Update the corresponding test.

Ducasse avatar Dec 03 '24 06:12 Ducasse