dgsuarez / reruby

Refactor Ruby
MIT License
35 stars 2 forks source link

Extract method doesn't keep last asignment #32

Closed dgsuarez closed 6 years ago

dgsuarez commented 6 years ago

When extracting something like

a = 3
b = 4
c = a + b

It should get replaced by:

c = new_method

and the source of new method should be something like:

def new_method
  a = 3
  b = 4
  a + b
end