Hacker News new | ask | show | jobs
by iovrthoughtthis 3097 days ago
rescue on do blocks!!! Wooooo. Merry Christmas!

Ruby is a joy to use.

2 comments

Can’t beat reversing the backtrace output for making Ruby even more enjoyable. Slogging up through a huge pile of calls was one of the few things that drove me mad.
Just need to rework all these

e.backtrace.first lines to e.backtrace.last

Or maybe my favorite which is still good

puts “#{e.message} #{e.backtrace.join(“\n”)}”

That code will still work, they are using the experimental feature only when the backtrace is printed to a tty.
Best thing to ever happen to Sinatra and the many block-oriented frameworks. Been looking forward to this one all year :D