Project

General

Profile

Actions

Misc #9724

open

Warnings in Ruby: allow per-file directives to i.e. suppress warnings

Added by shevegen (Robert A. Heiler) over 10 years ago.

Status:
Open
Assignee:
-
[ruby-core:61948]

Description

Hi,

A bit of intro.

I usually run all my ruby code with -w. I feel that it gives me some more security if the
ruby parser does not have to think about ambiguous code.

Now this works perfect for my own code - I know what I have written, I know how to fix it,
so my code runs fine.

Problem is other people who do not use the -w switch, and in doing so their stuff outputs
a lot of warnings if I require their project and use them.

This is somewhat annoying and there is no real good way to fix it as far as I know.

Modifying $VERBOSE and setting it to nil is of no real help because it works globally.
But I'd rather want something to be used on a per-file basis.

Would it be possible to enable something that could be used on a per file
basis? Kernel.no_warnings, or Kernel.be_silent or something like this?

No data to display

Actions

Also available in: Atom PDF

Like0