Ideas for Ruby 2 Manners #
If I could clean up the little quacks that Ruby gives here and there.
Object.inspect
Currently:
=> #<Object:0xb7cd5ed0>
=> #<Book:0xb7cc4d00 @title="Gorbachev's Finger Tricks",
@author="Gorbachev", @length=150>
=> #<File:ruby.h>
Slight polish:
=> (Object)
=> (Book @title="Gorbachev's Finger Tricks"
@author="Gorbachev" @length=150)
=> (File ruby.h)
Proc.inspect
Currently:
=> #<Proc:0xb7d19aa0@(irb):4>
Show arity?
=> (Proc |a,*b|)
Backtraces and Warnings
Currently:
bin/tiny_wm.rb:4: parse error, unexpected '='
$d = = X11::Display.new
^
bin/tiny_wm.rb:2:in `require': no such file to load -- X11/Display (LoadError)
from bin/tiny_wm.rb:2
ArgumentError: wrong number of arguments (3 for 1)
from (irb):1:in `gets'
from (irb):1
/home/why/bin/warn.rb:2: warning: parenthesize argument(s) for future version
Slight polish:
ParseError in bin/tiny_wm.rb (line 4):
unexpected '='
> $d = = X11::Display.new
> ^
LoadError in bin/tiny_wm.rb (line 2) at `require':
no such file to load -- X11/Display
from bin/tiny_wm.rb (line 2)
ArgumentError in irb (line 1) at `gets':
wrong number of arguments (3 for 1)
from irb (line 1)
Warning in /home/why/bin/warn.rb (line 2):
parenthesize argument(s) for future version
We should avoid wrapping the `message’ inside the initial line of a backtrace. It is often the most crucial part.
It sure would be nice to have the ability to customize the look of your backtraces. To have backtrace objects like in Sydney. I’d like to brightly ANSI highlight the backtrace line which refers to $PROGRAM_NAME, give a dark color to trace lines from the stdlib and medium highlight everything else.
I’m sure all of you out there can give help here. But you know what I mean about some of these?

