Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:RInlineTemp substitutes variable names in comments #50

Open
mcary opened this issue Oct 12, 2016 · 0 comments
Open

:RInlineTemp substitutes variable names in comments #50

mcary opened this issue Oct 12, 2016 · 0 comments

Comments

@mcary
Copy link

mcary commented Oct 12, 2016

Thanks for taking a stab at this refactoring plugin, @ecomba.

When I have comments within the method talking about domain concepts, the temp variable's value gets inlined there as well:

def foo
  user = User.find
  # Update the user's timestamp?
  user.save!
end

with cursor on user = ..., when I run :RInlineTemp, I get:

def foo
  # Update the User.find's timestamp?
  User.find.save!
end

Note how the comment was altered.

I would like comments to not be updated. In some cases where the comment is actually code, it could make sense, but generally I don't think the refactoring tools should manipulate comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant