On Tue, Sep 9, 2008 at 2:08 PM, Kornelius Kalnbach <murphy / rubychan.de> wrote:
> hello!
>
> Ruby allows code like this:
>
>  def file_replace filename, file,
>    files = document.files
>
> In this case, it was a typo, and could have produced problems. I'm not
> sure how many people are using multi-line method declarations
> intentionally, but I think they are few.
>
> So I suggest that the Ruby parser issues a warning, like:
>
>  warning: trailing comma in method declaration
>
> It should be possible to silence the warning:
>
>  def file_replace filename, file, \
>    files = document.files
>
> with the backslash making clear what you want here.
>
> What do you think?
> [murphy]

Putting parentheses around your method arguments is a simpler, cleaner
solution, I think.

I'd hate to have to introduce \ to avoid a warning!

Best,
jeremy