We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Inside the following method:
def validate(numbers) bar = 1 numbers.any? do |n| n < 0 end end
,with
numbers.any? do |n| n < 0 end
When I do extract method, and give the new method a name of "check_numbers", I get the following:
def check_numbers(n,numbers) numbers.any? do |n| n < 0 end end def validate(numbers) bar = 1 check_numbers(n,numbers) end
Instead, I expect:
def validate(numbers) bar = 1 check_numbers(numbers) end def check_numbers(numbers) numbers.any? do |n| n < 0 end end
The text was updated successfully, but these errors were encountered:
Note that the temp is needed here, without it, the refactoring works as expected.
Sorry, something went wrong.
Cheers Tom, I'll take a look at this one
nrocy
No branches or pull requests
Inside the following method:
,with
numbers.any? do |n|
n < 0
end
When I do extract method, and give the new method a name of "check_numbers", I get the following:
Instead, I expect:
The text was updated successfully, but these errors were encountered: