ecomba / vim-ruby-refactoring

Refactoring tool for Ruby in vim!
520 stars 52 forks source link

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

Open tcrayford opened 13 years ago

tcrayford commented 13 years ago

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
tcrayford commented 13 years ago

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).

despo commented 13 years ago

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