From: Peter Date: 2012-08-14T04:59:08+09:00 Subject: Idea: def ... end returns the symbolized version of the newly-defined method, instead of nil --14dae934070d56f52304c72b205b Content-Type: text/plain; charset=ISO-8859-1 This would allow useful syntax constructs such as this: protected def protected_method ... end and private def private_method ... end I hear from #ruby that this may have been proposed years ago. Also, the symbolized version of the method_name is instantiated anyway already, so the extra cost is nil. Thoughts? Why no traction? -Peter Marreck -- "I'd put my money on the sun and solar energy. What a source of power! I hope we don't have to wait until oil and coal run out before we tackle that." -Thomas Edison, 1931 --14dae934070d56f52304c72b205b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This would allow useful syntax constructs such as this:

= protected def protected_method
=A0 ...
end
and=A0

private def private_method
=A0 ...
end

I hear from #ruby that = this may have been proposed years ago. Also, the symbolized version of the = method_name is instantiated anyway already, so the extra cost is nil. Thoug= hts? Why no traction?

-Peter Marreck

--
"I'd= put my money on the sun and solar energy. What a source of power! I hope w= e don't have to wait until oil and coal run out before we tackle that.&= quot;
-Thomas Edison, 1931
--14dae934070d56f52304c72b205b--