Skip to content

Conversation

@marocchino
Copy link
Contributor

No description provided.

@meagar
Copy link
Contributor

meagar commented Dec 3, 2014

👎 *args Is a common convention that I see all the time and easier to type than params

@marocchino
Copy link
Contributor Author

I did not suggest new change. It was just fix wrong codes.
Look at the before line. def #{unsafe_method}(*params, &block).
I think it should change both line.

bbatsov added a commit that referenced this pull request Dec 3, 2014
Change inside of method (related #378)
@bbatsov bbatsov merged commit a80af61 into rubocop:master Dec 3, 2014
@marocchino marocchino deleted the fix-arg branch December 3, 2014 14:17
@bbatsov
Copy link
Collaborator

bbatsov commented Dec 3, 2014

👍 for fixing the problem

@meagar While *args is popular indeed, some people recently expressed the desire to use the technically correct term "params" instead. Normally I use both terms interchangeably, but I do acknowledge that formally they mean different things.

@sethkrasnianski
Copy link
Contributor

Looking back at this, I believe it was incorrect to merge it. The correction was not accurate. Referring to my original PR

When writing a method's signature (declaring the method), the values being passed to a method are called parameters, not arguments. When calling a method, the values passed to the call are formally known as arguments. This is a general misnomer in the programming community. I've corrected all relevant instances.

to_str.#{unsafe_method}(*params, &block)
and
find_by(prop, *params, &block)
are both calling respective methods, not declaring them.

@marocchino
Copy link
Contributor Author

are both calling respective methods, not declaring them.

Yes, it is. But it occur NameError, when it called.

@sethkrasnianski
Copy link
Contributor

sure, that may happen, but it's still a value passed to the method... right?

marocchino pushed a commit to marocchino/ruby-style-guide that referenced this pull request Aug 11, 2015
shyouhei pushed a commit to shyouhei/ruby-style-guide that referenced this pull request Nov 11, 2015
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

Successfully merging this pull request may close these issues.

4 participants