This is a nice addition indeed and I remember I asked for it too in the past. One usage could be method annotation like what is done in some command line library: desc 'Do something' def do_something ... end The above code l...gcao (Guoliang Cao)
I did some quick experiment with prepend and noticed a strange behavior. "prepend B; prepend C" and "prepend B, C" produce same ancestors. However, their behaviors are different. IMHO, "prepend B, C" should just insert B and C int...gcao (Guoliang Cao)
You are right, anything other than 'then' or maybe 'also' hurts readability. Guess I'm too obsessed with finding something that can work for this case :-P gcao (Guoliang Cao)
Even though using 'also' means adding a new keyword and breaks compatibility, practically no one uses it as method name or variable name. I searched my whole ruby lib directory, it never appeared in code. Another candidate is \\. It doe...gcao (Guoliang Cao)
I agree. If 'then' or '++' does not work, what about 'also'? I'm not a native English speaker and not sure whether it sounds natural. Maybe someone can come up with something that fits well to this case. do_this also do_that a...gcao (Guoliang Cao)
Sorry I didn't know this. I have never seen ++ in ruby code (except probably in books) and that made me think it is not valid syntax. Wonder what is the usefulness of '1 + +1' though.gcao (Guoliang Cao)
I propose to make below code work do_something(a) if a = condition Above code should work exactly same as if a = condition do_something(a) end If there is a reason behind why the first case does not work, please l...gcao (Guoliang Cao)
I propose to use ++ to connect two or multiple statements, e.g. do_this ++ do_that ++ do_something It is equivalent to (do_this; do_that; do_something) but more readable. It can be used to replace below idiom do_something and...gcao (Guoliang Cao)