[Cuis-dev] Refactoring fixes and enhancements
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Tue Sep 29 06:27:59 PDT 2026
Hi,
Attached is a series of cs and tests for the following refactoring fixes
and enhancements:
Inline Method
- *Two sends in one statement.* Inlining failed with overlapping
replacements. Now only the send itself is replaced.
- *Evaluation order.* A method with several statements is inlined as `[
... ] value` when moving its statements before the sender's statement
would change the order: several sends in the statement, or something other
than literals evaluated before the send. The block keeps original method
source format.
- *Temporaries of a block.* When inlining a method as block, they are
declared inside the block and keep their name, unless the containing scope
already has it.
Extract to Temporary and Add Parameter
- Both added names to Undeclared when parsing code. They now parse
ignoring undeclared names.
Tests
- *Flaky tests.* Five tests asserted on the global Undeclared. They now
use RefactoringTest>>should:notLeaveUndeclared:, which removes the name
first.
- *Tests that need an undeclared name *were fixed
- *New tests.* for InlineMethod, ExtractToTemporary and AddParameter
Renames
- isReceiverOfPieceTemporary: and the other names with "piece" that I
had written now say CodeToExtract.
They are small changes (some not so small :) ), but I decided to send them
all together to avoid bothering with this :-)
Cheers!
Hernan.
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.031.cs.st
Type: application/octet-stream
Size: 2709 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0014.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.032.cs.st
Type: application/octet-stream
Size: 22030 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0015.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.030.cs.st
Type: application/octet-stream
Size: 3067 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0016.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8202-parseIngnoringUndeclared-HernanWilkinson-2026Sep28-19h00m-HAW.001.cs.st
Type: application/octet-stream
Size: 1443 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0017.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8201-InlineMethodBlockTemporaries-HernanWilkinson-2026Sep28-17h24m-HAW.001.cs.st
Type: application/octet-stream
Size: 9518 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0018.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8200-InlineMethodAsBlock2-HernanWilkinson-2026Sep28-16h50m-HAW.001.cs.st
Type: application/octet-stream
Size: 4707 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0019.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8199-InlineMethodAsBlock-HernanWilkinson-2026Sep28-14h45m-HAW.001.cs.st
Type: application/octet-stream
Size: 3171 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0020.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.029.cs.st
Type: application/octet-stream
Size: 700 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0021.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.028.cs.st
Type: application/octet-stream
Size: 2989 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0022.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8198-InlineMethodMoreThanOnePerStatement-HernanWilkinson-2026Sep28-13h27m-HAW.001.cs.st
Type: application/octet-stream
Size: 7346 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0023.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.027.cs.st
Type: application/octet-stream
Size: 3083 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0024.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8197-MinorRenameToCodeToExtract-HernanWilkinson-2026Sep26-11h41m-HAW.001.cs.st
Type: application/octet-stream
Size: 4182 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0025.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8203-InlineMethodMultiLineBlock-HernanWilkinson-2026Sep29-09h55m-HAW.001.cs.st
Type: application/octet-stream
Size: 4573 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0026.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.033.cs.st
Type: application/octet-stream
Size: 726 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260929/4e1fb2e4/attachment-0027.obj>
More information about the Cuis-dev
mailing list