vim-ruby-refactoring icon indicating copy to clipboard operation
vim-ruby-refactoring copied to clipboard

:RInlineTemp does not work if the local variable is assigned again

Open tom-pang opened this issue 14 years ago • 2 comments

On the first line of:

x = 5
foo = x + 10
x = 10
bar = x + 10

Doing RInlineTemp gives me:

foo = x + 10
5 = 10
bar = x + 10

It should result in the following:

foo = 5 + 10
x = 10
bar = x + 10

tom-pang avatar Jun 01 '11 17:06 tom-pang

I'm not so sure how easy it will be to fix this properly without doing hard-core analysis of the code (I'm having a go anyway).

tom-pang avatar Jun 01 '11 18:06 tom-pang

hi tom,

i was looking at some other issue and the problem you describe seems to have been resolved as a consequence of the changes. on commit https://github.com/despo/vim-ruby-refactoring/commit/d86f9e04e4906873e034e8ebd75f3be71579f7ec

despo avatar Jun 01 '11 18:06 despo