From d3e7b990dc096f71a32eb18959503328b78cf2b1 Mon Sep 17 00:00:00 2001 From: mame Date: Fri, 9 Apr 2010 14:55:18 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ lib/irb/init.rb | 12 ++++++++++++ lib/irb/lc/help-message | 2 ++ lib/irb/lc/ja/help-message | 2 ++ 4 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 936dec206c..9ac11cce81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 9 23:54:16 2010 Yusuke Endoh + + * lib/irb/init.rb, lib/irb/lc/help-message, + lib/irb/lc/ja/help-message: add -w flag. [ruby-core:24594] + Fri Apr 9 23:51:45 2010 Yusuke Endoh * ext/socket/ipsocket.c (init_inetsock_internal), 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 diff --git a/lib/irb/lc/help-message b/lib/irb/lc/help-message index dd30b9fd24..18aea149bc 100644 --- a/lib/irb/lc/help-message +++ b/lib/irb/lc/help-message @@ -17,6 +17,8 @@ Usage: irb.rb [options] [programfile] [arguments] -I path Specify $LOAD_PATH directory -U Same as `ruby -U` -E enc Same as `ruby -E` + -w Same as `ruby -w` + -W[level=2] Same as `ruby -W` --inspect Use `inspect' for output (default except for bc mode) --noinspect Don't use inspect for output --readline Use Readline extension module diff --git a/lib/irb/lc/ja/help-message b/lib/irb/lc/ja/help-message index f2c4066cf6..78ba72ed35 100644 --- a/lib/irb/lc/ja/help-message +++ b/lib/irb/lc/ja/help-message @@ -16,6 +16,8 @@ Usage: irb.rb [options] [programfile] [arguments] -I path $LOAD_PATH に path を追加する. -U ruby -U と同じ. -E enc ruby -E と同じ. + -w ruby -w と同じ. + -W[level=2] ruby -W と同じ. --inspect 結果出力にinspectを用いる(bcモード以外はデフォルト). --noinspect 結果出力にinspectを用いない. --readline readlineライブラリを利用する.