RB refactor temp to instance var

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RB refactor temp to instance var

Ron Jeffries
Hi, just got here, so if I'm out of date, I apologize.

if I have two methods using the same temp name, and I want to change the temp to an instance variable, the RB will change the first one, but then to change
the other I have to edit the method manually.

The rationale may be that it may not be safe, and I see that it may not be. OTOH, what I'm doing /is/ safe. It'd be nice if the RB would just tell me that the
instance variable exists and then ask me if I want to use it.

Or am I missing something deep?

Thanks,

Ron Jeffries


Reply | Threaded
Open this post in threaded view
|

Re: RB refactor temp to instance var

Blair McGlashan
"Ron Jeffries" <[hidden email]> wrote in message
news:[hidden email]...
> Hi, just got here, so if I'm out of date, I apologize.
>
> if I have two methods using the same temp name, and I want to change the
temp to an instance variable, the RB will change the first one, but then to
change
> the other I have to edit the method manually.
>
> The rationale may be that it may not be safe, and I see that it may not
be. OTOH, what I'm doing /is/ safe. It'd be nice if the RB would just tell
me that the
> instance variable exists and then ask me if I want to use it.
>
> Or am I missing something deep?

I think this is really a question for Don or John as it is more general than
the application of the RB in the D5.

Sorry for the lack of useful content in this message, I just wanted to
extend our welcome :-).

Regards

Blair