From: "shyouhei (Shyouhei Urabe)" Date: 2012-10-27T05:54:25+09:00 Subject: [ruby-core:48345] [ruby-trunk - Feature #2709] $VERBOSE, $DEBUG and Kernel#sprintf Issue #2709 has been updated by shyouhei (Shyouhei Urabe). Target version changed from 2.0.0 to Next Major I personally like this feature so I really hesitate to reject, but as matz do not like it so much, there are relatively few chances for the proposal now. We have to persuade him. ---------------------------------------- Feature #2709: $VERBOSE, $DEBUG and Kernel#sprintf https://bugs.ruby-lang.org/issues/2709#change-31654 Author: paddor (Patrik Wenger) Status: Assigned Priority: Low Assignee: shyouhei (Shyouhei Urabe) Category: core Target version: Next Major =begin Kernel#sprintf is very useful. I think the power lies within the ignorance of too many arguments. So one is free to decide which arguments he uses and which one he doesn't. This applies to a Ruby runtime where $VERBOSE and $DEBUG are false. Following the POLS (Principle of the least surprise), one would assume that changing the variables $VERBOSE and $DEBUG wouldn't change the behavior of Kernel#sprintf. But they do. $VERBOSE causes warnings when there are too many arguments. $DEBUG causes an ArgumentError when there are too many arguments. This isn't useful at all. I like the effect of $DEBUG according to threads, to raise uncaught exceptions from the thread. But in the case of Kernel#sprintf, it's just not useful. This behavior prohibits some power of Ruby. My suggestion: Remove the special behavior of $VERBOSE and $DEBUG in Kernel#sprintf. Thank you very much. =end -- http://bugs.ruby-lang.org/