aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/init.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-09 14:55:18 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-09 14:55:18 +0000
commitd3e7b990dc096f71a32eb18959503328b78cf2b1 (patch)
treea29647d4113ea04c403ae1c4381c821790108b97 /lib/irb/init.rb
parent79a3b7797f559d3aa41816368c8a3c1fb26f4530 (diff)
downloadruby-d3e7b990dc096f71a32eb18959503328b78cf2b1.tar.gz
* lib/irb/init.rb, lib/irb/lc/help-message,
lib/irb/lc/ja/help-message: add -w flag. [ruby-core:24594] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/init.rb')
-rw-r--r--lib/irb/init.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index f51fd1c0b1..d428850e3f 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -135,6 +135,18 @@ module IRB
@CONF[:MATH_MODE] = true
when "-d"
$DEBUG = true
+ when "-w"
+ $VERBOSE = true
+ when /^-W(.+)?/
+ opt = $1 || ARGV.shift
+ case opt
+ when "0"
+ $VERBOSE = nil
+ when "1"
+ $VERBOSE = false
+ else
+ $VERBOSE = true
+ end
when /^-r(.+)?/
opt = $1 || ARGV.shift
@CONF[:LOAD_MODULES].push opt if opt