I've been looking for a way to supress warnings at runtime, not just in
the shebang line.. I've tride setting $VERBOSE = nil but that doesn't
seem to work right. Specifically i'm getting warnings when accessing
Object#id, saying it's deprecated.. is there a way to turn off just
deprecated warnings?
Thanks
···
--
Posted via http://www.ruby-forum.com/.
Change calls from .id to .object_id to turn off this warning.
···
On Aug 23, 2007, at 17:22, Aaron Smith wrote:
I've been looking for a way to supress warnings at runtime, not just in
the shebang line.. I've tride setting $VERBOSE = nil but that doesn't
seem to work right. Specifically i'm getting warnings when accessing
Object#id, saying it's deprecated.. is there a way to turn off just
deprecated warnings?
--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
Hi,
At Fri, 24 Aug 2007 09:22:37 +0900,
Aaron Smith wrote in [ruby-talk:266024]:
I've been looking for a way to supress warnings at runtime, not just in
the shebang line.. I've tride setting $VERBOSE = nil but that doesn't
seem to work right. Specifically i'm getting warnings when accessing
Object#id, saying it's deprecated.. is there a way to turn off just
deprecated warnings?
Setting $VERBOSE = nil.
$ ruby -v -e id
ruby 1.8.6 (2007-08-21 revision 13127) [i686-linux]
-e:1: warning: Object#id will be deprecated; use Object#object_id
$ ruby -v -e '$VERBOSE=nil;id'
ruby 1.8.6 (2007-08-21 revision 13127) [i686-linux]
···
--
Nobu Nakada