Project

General

Profile

Actions

Feature #1832

closed

irb -w

Added by candlerb (Brian Candler) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
[ruby-core:24594]

Description

=begin
It would be nice if either irb had a -w flag, or $VERBOSE defaulted to true in irb.

$ irb19
irb(main):001:0> $VERBOSE
=> false
=end

Actions #1

Updated by rogerdpack (Roger Pack) over 15 years ago

=begin
So what you're looking for is a command line parameter to turn $VERBOSE on?
That would be nice [and also for rake I wish it had this].
Thanks.
=r
=end

Actions #2

Updated by marcandre (Marc-Andre Lafortune) over 15 years ago

  • Category set to lib
  • Assignee set to keiju (Keiju Ishitsuka)

=begin

=end

Actions #3

Updated by mame (Yusuke Endoh) almost 15 years ago

=begin
Hi,

It would be nice if either irb had a -w flag

Maybe reasonable because irb has a -d flag already.

diff --git a/lib/irb/init.rb b/lib/irb/init.rb
old mode 100644
new mode 100755
index f51fd1c..d428850
--- 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 dd30b9f..18aea14 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 f2c4066..78ba72e 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ライブラリを利用する.

--
Yusuke Endoh
=end

Actions #4

Updated by murphy (Kornelius Kalnbach) almost 15 years ago

=begin
On 18.03.10 12:22, Yusuke Endoh wrote:

It would be nice if either irb had a -w flag

Maybe reasonable because irb has a -d flag already.
yes, please. half the time I start irb, I run into this inconsistency.

[murphy]

=end

Actions #5

Updated by keiju (Keiju Ishitsuka) over 14 years ago

=begin
Hi. Yusuke,

Please commit this patch.
=end

Actions #6

Updated by znz (Kazuhiro NISHIYAMA) over 14 years ago

  • Status changed from Open to Assigned
  • Assignee changed from keiju (Keiju Ishitsuka) to mame (Yusuke Endoh)
  • Target version set to 1.9.2

=begin

=end

Actions #7

Updated by mame (Yusuke Endoh) over 14 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27273.
Brian, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0