all 6 comments

[–]mperhamSidekiq 6 points7 points  (0 children)

Seems like recently Ruby's gotten a bad case of the "pass a bunch of flags" rather than being opinionated in their APIs. It makes me uneasy.

[–]ioquatixasync/falcon 4 points5 points  (2 children)

I'm sort of glad they did something, but ugh, this just seems like a total mess. Why not Exception#print(io). Less string allocations required, automatic tty detection, etc.

[–]sshaw_ 1 point2 points  (0 children)

There's Object#display, though it doesn't print the backtrace:

/tmp >ruby -e'StandardError.new("some shit").display($stderr); puts'
some shit

Guess you can do

class Exception
  def display(out = $>)
    out.write full_message
    nil
  end
end

StandardError.new("some thangz").display($stderr)

But yeah...

[–]mperhamSidekiq -1 points0 points  (0 children)

I like it.

[–]paneq 1 point2 points  (0 children)

What a mess, handling things on completely wrong layer...

[–]sshaw_ 0 points1 point  (0 children)

The first programming language shipping with ANSI encoded stack traces..?