Y
Hacker News
new
|
ask
|
show
|
jobs
by
listrophy
5532 days ago
After seeing Avdi talk about this at Ruby on Ales, I've started using `fail` almost exclusively instead of `raise.`
It's the little things.
1 comments
umjames
5532 days ago
I quick check of the Ruby documentation (
http://www.ruby-doc.org/core/
) suggests that raise and fail are the same method.
Is there an actual difference between these methods?
link
avdi
5532 days ago
Nope! It's strictly a style issue. As I explain in the video (or the book if you buy it), as a result of a conversation with Jim Weirich I'm starting to use "fail" once again.
link
Is there an actual difference between these methods?