Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > running ala Perl's strict

Reply
Thread Tools

running ala Perl's strict

 
 
David Garamond
Guest
Posts: n/a
 
      06-27-2004
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



 
Reply With Quote
 
 
 
 
Paul Brannan
Guest
Posts: n/a
 
      07-02-2004
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALA Updates Mimic HTML 77 08-29-2005 09:42 PM
OT: Server Bricks ala Dennis kpg MCSE 3 07-09-2005 05:49 PM
JVM shut down ala Eclipse or Jbuilder Sambucus Java 5 11-30-2004 12:30 PM
Dynamic content ala HTML Tripredacus-X XML 0 02-11-2004 12:39 AM
Any interest in lightweight coroutines in Java ala C# 2.0 iterators? Ken Sprague Java 4 10-28-2003 08:03 PM



Advertisments