Skip to content

Add inline variable refactor #2504

Open
@vinistock

Description

@vinistock

Note

This issue is aimed at those attending the RubyConf 2024 Hack Day

Add a new code action to inline a local variable. For example:

# BEFORE
def foo
  a = 5 * 10
  puts a
  b = a - 5
end

# AFTER
def foo
  puts 5 * 10
  b = 5 * 10 - 5
end

Here's an example PR adding a refactor end to end #2372.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp-wantedExtra attention is neededpinnedThis issue or pull request is pinned and won't be marked as staleserverThis pull request should be included in the server gem's release notes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions