The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Ideas for Ruby 2 Manners

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Ideas for Ruby 2 Manners Posted: Feb 14, 2006 2:48 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Ideas for Ruby 2 Manners
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

If I could clean up the little quacks that Ruby gives here and there.

Object.inspect

Currently:

 => #
 => #
 => #

Slight polish:

 => (Object)
 => (Book @title="Gorbachev's Finger Tricks",
    @author="Gorbachev", @length=150)
 => (File ruby.h)

Proc.inspect

Currently:

 => #

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?

Read: Ideas for Ruby 2 Manners

Topic: Me & the Thirsty Cups at SXSW in March, Then RailsConf in June Previous Topic   Next Topic Topic: Widget Configurability via YAML?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use