This project is archived and is in readonly mode.
refactor #try to use inheritance
Reported by Josh Susser | January 17th, 2009 @ 01:32 AM | in 2.x
I'm not a fan of Object#try, but if it's going to be in the code base, the implementation should at least be optimal. This patch collapses two method calls and a conditional test into a single method call by splitting the two cases into two methods in Object and NilClass.
Comments and changes to this ticket
-
Xavier Noria January 17th, 2009 @ 01:58 AM
Hi Josh, just a few details about the rdoc:
-
Section headers have no colon normally. I've seen a few exceptions in the current tree whose remaining time of existence can be measured in minutes :-).
-
"With try" is not commented.
-
Code example lacks indentation.
-
-
Josh Susser January 17th, 2009 @ 02:57 AM
I mainly copied the rdoc from the old implementation but oh well. Fixed it up. Don't know enough about rdoc to fool it, so I added a doc-only method def that gets dropped by aliasing try to send. Better ideas of how to rdoc this are welcome.
-
Repository January 18th, 2009 @ 12:48 AM
- State changed from new to resolved
(from [78f2c19ae7f9236591c261eecdf0c4b570e3ea1e]) Refactor Object#try to use inheritance. [#1774 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1774 refactor #try to use inheritance (from [78f2c19ae7f9236591c261eecdf0c4b570e3ea1e]) Refacto...