running ala Perl's strict

Discussion in 'Ruby' started by David Garamond, Jun 27, 2004.

  1. With -w (verbose mode), Ruby can print compilation warnings, like
    uninitialized instance variables.

    $ ruby -we 'p @a'
    -e:1: warning: instance variable @a not initialized

    Is there a mode (ala Perl's strict or something similar) that makes Ruby
    raises errors for compilation warnings?

    --
    dave
     
    David Garamond, Jun 27, 2004
    #1
    1. Advertising

  2. David Garamond

    Paul Brannan Guest

    On Sun, Jun 27, 2004 at 07:06:29PM +0900, David Garamond wrote:
    > With -w (verbose mode), Ruby can print compilation warnings, like
    > uninitialized instance variables.
    >
    > $ ruby -we 'p @a'
    > -e:1: warning: instance variable @a not initialized
    >
    > Is there a mode (ala Perl's strict or something similar) that makes Ruby
    > raises errors for compilation warnings?


    No, though I wish there were. You can hack it with a thread that reads
    from standard error and looks for warnings.

    Paul
     
    Paul Brannan, Jul 2, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Sprague
    Replies:
    4
    Views:
    706
  2. Sambucus
    Replies:
    5
    Views:
    1,037
    Andrew Thompson
    Nov 30, 2004
  3. Mimic

    ALA Updates

    Mimic, Aug 24, 2005, in forum: HTML
    Replies:
    77
    Views:
    2,147
    Mimic
    Aug 29, 2005
  4. Tripredacus-X

    Dynamic content ala HTML

    Tripredacus-X, Feb 11, 2004, in forum: XML
    Replies:
    0
    Views:
    355
    Tripredacus-X
    Feb 11, 2004
  5. Sebastien de Menten

    python plugin for excel (ala gnumeric)

    Sebastien de Menten, Sep 4, 2003, in forum: Python
    Replies:
    1
    Views:
    541
    Andrew Dalke
    Sep 4, 2003
Loading...

Share This Page