Execute arbitrary code with different level of error messaging


/ Published in: Ruby
Save to your folder(s)

You can turn off warnings for a section of your code by setting $VERBOSE to nil. Even better is to codify this in a method. Since this method takes a block as its parameter, you can now pass it arbitrary chunks of code to execute without warnings.

URL: http://www.caliban.org/ruby/rubyguide.shtml

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.