Professional Web Applications Themes

A way to "require 'warnings'" - Ruby

It would be nice if there was a "warnings.rb" file in the standard distribution that contained: $VERBOSE = true ...so you could say require 'warnings' in a script, which, IMHO, reads a little better than "$VERBOSE = true" What do you think? Jason Creighton...

  1. #1

    Default A way to "require 'warnings'"

    It would be nice if there was a "warnings.rb" file in the standard
    distribution that contained:

    $VERBOSE = true

    ...so you could say

    require 'warnings'

    in a script, which, IMHO, reads a little better than "$VERBOSE = true"

    What do you think?

    Jason Creighton
    Jason Guest

  2. #2

    Default Re: A way to "require 'warnings'"

    Jason Creighton wrote: 

    Makes sense. Or it could be 'ant.rb' instead of 'warnings.rb' so that
    you could say

    $ ruby -rant -e 'p Math.cos 0'
    -e:1: warning: parenthesize argument(s) for future version
    1.0


    Joel Guest

  3. #3

    Default Re: A way to "require 'warnings'"

    On Sat, 21 Feb 2004 09:31:11 +0900,
    Joel VanderWerf <Berkeley.EDU> wrote:
     
    >
    > Makes sense. Or it could be 'ant.rb' instead of 'warnings.rb' so that
    > you could say
    >
    > $ ruby -rant -e 'p Math.cos 0'
    > -e:1: warning: parenthesize argument(s) for future version
    > 1.0[/ref]

    Oh! Neat idea! We could also have 'ave.rb' as an alias. :-)

    Jason Creighton
    Jason Guest

  4. #4

    Default Re: A way to "require 'warnings'"

    David A. Black wrote:
    ... 
    ... 
    >>
    >>Oh! Neat idea! We could also have 'ave.rb' as an alias. :-)[/ref]
    >
    >
    > And 'emonstrate.rb' :-)[/ref]

    eproach.rb, eprimand.rb, ebuke.rb, eprove.rb, eject.rb, idicule.rb,
    oast.rb, efuse.rb, epudiate.rb, eprobate.rb ... the horror, the horror!


    Joel Guest

Similar Threads

  1. Replies: 4
    Last Post: March 20th, 04:11 PM
  2. #38779 [NEW]: Engine crash when "require" file with syntax error through stream wrapper
    By alexander dot netkachev at gmail dot com in forum PHP Bugs
    Replies: 3
    Last Post: September 11th, 02:30 PM
  3. Replies: 1
    Last Post: August 24th, 01:20 PM
  4. #25194 [NEW]: require() not findings files when "." is in include_path
    By ri at kamp dot de in forum PHP Development
    Replies: 0
    Last Post: August 21st, 04:00 PM
  5. Replies: 0
    Last Post: July 27th, 09:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139