Bug #6301

irb 起動後に conf.debug_level を変更するとエラーになる

Added by Sho Hashimoto about 2 years ago. Updated over 1 year ago.

[ruby-dev:45517]
Status:Closed
Priority:Normal
Assignee:Keiju Ishitsuka
Category:lib
Target version:-
ruby -v:ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] Backport:

Description

$ irb --irbdebug <数字> などでは問題ありませんが、irb の起動後に conf.debuglevel を設定するとエラーになるようです。(1.9.3-p125 で確認しましたが、trunk でも同様のようです)

conf.debuglevel = "1"
NoMethodError: undefined method debug_level=' for IRB::SLex:Class
from /home/sho-h/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/irb/context.rb:245:in
debug
level='

IRB::SLex.debuglevel を代入するのを止めるか、debuglevel を追加するのがよいのではないかと思いました。

--- lib/irb/context.rb (revision 35336)
+++ lib/irb/context.rb (working copy)
@@ -242,7 +242,6 @@
def debuglevel=(value)
@debug
level = value
RubyLex.debuglevel = value
- SLex.debug
level = value
end

 def debug?

irb_debug_level.patch Magnifier (824 Bytes) Sho Hashimoto, 04/16/2012 11:38 PM

Associated revisions

Revision 38611
Added by Keiju Ishitsuka over 1 year ago

  • lib/irb/init.rb, lib/irb/context.rb: fix conf.debuglevel= [Bug #6301] and fix irb command option: -- irbdebug_level for irb.

Revision 38620
Added by Keiju Ishitsuka over 1 year ago

  • lib/irb/init.rb: change default debug level for irb, [Bug #6301].

History

#1 Updated by Ayumu AIZAWA about 2 years ago

  • Assignee set to Keiju Ishitsuka

#2 Updated by Sho Hashimoto about 2 years ago

すみません。昨日は気づきませんでしたが、conf.debug_level は irb の起動後に再度代入するまでは効いていないようでした。

$ irb

RubyLex.debuglevel
=> 0
conf.debug
level
=> 1
conf.debuglevel = 1
NoMethodError: undefined method debug_level=' for IRB::SLex:Class
from /home/sho-h/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/irb/context.rb:245:in
debug
level='
...(省略)...

conf.debug_level
MATCH: start : # 1

RubyLex.debug_level
MATCH: start : # 1

昨日の提案の修正に加えて以下が必要なのではないかと思いました。

  • IRB.conf[:DEBUG_LEVEL] のデフォルト値を 0 に揃える(現状の実際の動作を維持)
  • lib/irb/init.rb で conf.debug_level の値を反映させる

#3 Updated by Yusuke Endoh about 2 years ago

  • Status changed from Open to Assigned

#4 Updated by Keiju Ishitsuka over 1 year ago

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

This issue was solved with changeset r38611.
Sho, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/irb/init.rb, lib/irb/context.rb: fix conf.debuglevel= [Bug #6301] and fix irb command option: -- irbdebug_level for irb.

#5 Updated by Heesob Park over 1 year ago

After the changeset r38611, the output of irb is too verbose by default.

C:\Users\phasis>irb
#>, "\u0004"=>#>, "\u001A"=>#>, " "=>#>, "\t"=>#>, "\f"=>#>, "\r"=>#>, "\v"=>#>, "#"=>#>, "="=>######, @postproc=#Proc:0x00000002e9fb18@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:359>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>, "="=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "~"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "\n"=>#>, ""=>#<IRB::SLex::Node:0x00000002e9e4c0 @Tree={""=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "<"=>##"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "<"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e949e8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:406>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, ">"=>##>, ">"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "!"=>##>, "~"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "'"=>#>, "\""=>#>, ""=>#<IRB::SLex::Node:0x00000002e8fc68 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8ff10@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:433>>, "?"=>#<IRB::SLex::Node:0x00000002e8f8d0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8fb00@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:443>>, "&"=>#<IRB::SLex::Node:0x00000002e8f560 @Tree={"&"=>#<IRB::SLex::Node:0x00000002e8f178 @Tree={"="=>#<IRB::SLex::Node:0x00000002e85b50 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>>, "="=>#<IRB::SLex::Node:0x00000002e8d030 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>>, "|"=>#<IRB::SLex::Node:0x00000002e8ee30 @Tree={"|"=>#<IRB::SLex::Node:0x00000002e8e750 @Tree={"="=>#<IRB::SLex::Node:0x00000002e86460 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>>, "="=>#<IRB::SLex::Node:0x00000002e8c1a8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>>, "+"=>#<IRB::SLex::Node:0x00000002e8de90 @Tree={"="=>#<IRB::SLex::Node:0x00000002e8de40 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>, "@"=>#<IRB::SLex::Node:0x00000002e852b8 @Tree={}, @preproc=#<Proc:0x00000002e85768@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:478>, @postproc=#<Proc:0x00000002e85740@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:478>>}, @preproc=nil, @postproc=#<Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>>, "-"=>#<IRB::SLex::Node:0x00000002e8db98 @Tree={"="=>#<IRB::SLex::Node:0x00000002e8db48 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>, "@"=>#<IRB::SLex::Node:0x00000002e84ed0 @Tree={}, @preproc=#<Proc:0x00000002e851a0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:484>, @postproc=#<Proc:0x00000002e85150@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:484>>}, @preproc=nil, @postproc=#<Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>>, "^"=>#<IRB::SLex::Node:0x00000002e87298 @Tree={"="=>#<IRB::SLex::Node:0x00000002e876d0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7e120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:578>>, "."=>#<IRB::SLex::Node:0x00000002e7fd68 @Tree={"."=>#<IRB::SLex::Node:0x00000002e7f930 @Tree={"."=>#<IRB::SLex::Node:0x00000002e7f548 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7fc00@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:521>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7fc00@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:521>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7ff20@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:508>>, "]"=>#<IRB::SLex::Node:0x00000002e7f0e8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7f368@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:531>>, "}"=>#<IRB::SLex::Node:0x00000002e7ee40 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7f368@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:531>>, ")"=>#<IRB::SLex::Node:0x00000002e7eb98 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7f368@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:531>>, ":"=>#<IRB::SLex::Node:0x00000002e7e8a0 @Tree={":"=>#<IRB::SLex::Node:0x00000002e7e558 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7e7d8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:550>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7ead0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:539>>, "/"=>#<IRB::SLex::Node:0x00000002e7e238 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7e490@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:562>>, ","=>#<IRB::SLex::Node:0x00000002e7dbd0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7ddd8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:589>>, ";"=>#<IRB::SLex::Node:0x00000002e7d810 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7da40@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:595>>, "~"=>#<IRB::SLex::Node:0x00000002e7d540 @Tree={"@"=>#<IRB::SLex::Node:0x00000002e7d0e0 @Tree={}, @preproc=#<Proc:0x00000002e7d400@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:612>, @postproc=#<Proc:0x00000002e7d388@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:612>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7d770@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:606>>, "("=>#<IRB::SLex::Node:0x00000002e7cd98 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7cfc8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:618>>, "["=>#<IRB::SLex::Node:0x00000002e7ca28 @Tree={"]"=>#<IRB::SLex::Node:0x00000002e7c9d8 @Tree={"="=>#<IRB::SLex::Node:0x00000002e7c5a0 @Tree={}, @preproc=#<Proc:0x00000002e7c898@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:638>, @postproc=#<Proc:0x00000002e7c870@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:638>>}, @preproc=#<Proc:0x00000002e7cc58@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632>, @postproc=#<Proc:0x00000002e7cc30@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632>>}, @preproc=nil, @postproc=#<Proc:0x00000002e7c4d8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:644>>, "{"=>#<IRB::SLex::Node:0x00000002e7c0c8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e7c2d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:663>>, "\\"=>#<IRB::SLex::Node:0x00000002e77e38 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e77fa0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:676>>, "%"=>#<IRB::SLex::Node:0x00000002e77bb8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e77d70@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:688>>, "$"=>#<IRB::SLex::Node:0x00000002e77988 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e77b18@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:703>>, "@"=>#<IRB::SLex::Node:0x00000002e776b8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e778e8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:708>>}, @preproc=nil, @postproc=#<Proc:0x00000002e775f0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:728>>>
irb(main):001:0> exit
MATCH: start : #<RubyLex:0x00000002ea63a0 @OP=<SLex: @head = #<IRB::SLex::Node:0x00000002ea62b0 @Tree={"\0"=>#<IRB::SLex::Node:0x00000002ea5e50 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea6120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:343>>, "\u0004"=>#<IRB::SLex::Node:0x00000002ea5928 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea6120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:343>>, "\u001A"=>#<IRB::SLex::Node:0x00000002ea5540 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea6120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:343>>, " "=>#<IRB::SLex::Node:0x00000002ea4e38 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea51d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:347>>, "\t"=>#<IRB::SLex::Node:0x00000002ea4b68 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea51d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:347>>, "\f"=>#<IRB::SLex::Node:0x00000002ea4668 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea51d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:347>>, "\r"=>#<IRB::SLex::Node:0x00000002ea4078 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea51d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:347>>, "\v"=>#<IRB::SLex::Node:0x00000002e9feb0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002ea51d0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:347>>, "#"=>#<IRB::SLex::Node:0x00000002e9fbe0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9fdc0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:354>>, "="=>#<IRB::SLex::Node:0x00000002e9f618 @Tree={"b"=>#<IRB::SLex::Node:0x00000002e9f5a0 @Tree={"e"=>#<IRB::SLex::Node:0x00000002e9f550 @Tree={"g"=>#<IRB::SLex::Node:0x00000002e9f460 @Tree={"i"=>#<IRB::SLex::Node:0x00000002e9f410 @Tree={"n"=>#<IRB::SLex::Node:0x00000002e9f3c0 @Tree={}, @preproc=#<Proc:0x00000002e9fb40@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:359>, @postproc=#<Proc:0x00000002e9fb18@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:359>>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>, "="=>#<IRB::SLex::Node:0x00000002e9d9a8 @Tree={"="=>#<IRB::SLex::Node:0x00000002e9d660 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "~"=>#<IRB::SLex::Node:0x00000002e9d1b0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "\n"=>#<IRB::SLex::Node:0x00000002e9ecb8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9efd8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:371>>, "*"=>#<IRB::SLex::Node:0x00000002e9e4c0 @Tree={"*"=>#<IRB::SLex::Node:0x00000002e9e010 @Tree={"="=>#<IRB::SLex::Node:0x00000002e8d4e0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "="=>#<IRB::SLex::Node:0x00000002e8d850 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "<"=>#<IRB::SLex::Node:0x00000002e9cc38 @Tree={"="=>#<IRB::SLex::Node:0x00000002e9cb98 @Tree={">"=>#<IRB::SLex::Node:0x00000002e9cb20 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "<"=>#<IRB::SLex::Node:0x00000002e94790 @Tree={"="=>#<IRB::SLex::Node:0x00000002e86f28 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e949e8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:406>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, ">"=>#<IRB::SLex::Node:0x00000002e96158 @Tree={"="=>#<IRB::SLex::Node:0x00000002e95820 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, ">"=>#<IRB::SLex::Node:0x00000002e955a0 @Tree={"="=>#<IRB::SLex::Node:0x00000002e869d8 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e8e110@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:471>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "!"=>#<IRB::SLex::Node:0x00000002e95230 @Tree={"="=>#<IRB::SLex::Node:0x00000002e94ec0 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "~"=>#<IRB::SLex::Node:0x00000002e94b00 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>}, @preproc=nil, @postproc=#<Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>>, "'"=>#<IRB::SLex::Node:0x00000002e94268 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e94650@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:428>>, "\""=>#<IRB::SLex::Node:0x00000002e8ed18 @Tree={}, @preproc=nil, @postproc=#<Proc:0x00000002e94650@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:428>>, "
"=>#>, "?"=>#>, "&"=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "|"=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "+"=>##>, "@"=>#, @postproc=#Proc:0x00000002e85740@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:478>}, @preproc=nil, @postproc=#Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>, "-"=>##>, "@"=>#, @postproc=#Proc:0x00000002e85150@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:484>}, @preproc=nil, @postproc=#Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>, ""=>#<IRB::SLex::Node:0x00000002e87298 @Tree={"="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e7e120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:578>, "."=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e7fc00@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:521>}, @preproc=nil, @postproc=#Proc:0x00000002e7ff20@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:508>, "]"=>#>, "}"=>#>, ")"=>#>, ":"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e7ead0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:539>, "/"=>#>, ","=>#>, ";"=>#>, "~"=>##, @postproc=#Proc:0x00000002e7d388@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:612>}, @preproc=nil, @postproc=#Proc:0x00000002e7d770@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:606>, "("=>#>, "["=>###, @postproc=#Proc:0x00000002e7c870@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:638>}, @preproc=#Proc:0x00000002e7cc58@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632, @postproc=#Proc:0x00000002e7cc30@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632>}, @preproc=nil, @postproc=#Proc:0x00000002e7c4d8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:644>, "{"=>#>, "\"=>#>, "%"=>#>, "$"=>#>, "@"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e775f0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:728>>, @io=#, @stdout=#, @prompt="irb(main):001:0> ">, @input=#Proc:0x0000000291b520@c:/usr/lib/ruby/2.0.0/irb.rb:457, @seek=0, @lineno=1, @explineno=1, @basecharno=0, @charno=0, @rests=["e", "x", "i", "t", "\n"], @readed=[], @herereaded=[], @indent=0, @indentstack=[], @lexstate=:EXPRBEG, @spaceseen=false, @hereheader=false, @continue=false, @line="", @skipspace=false, @readedautocleanup=false, @exceptiononsyntaxerror=false, @prompt=#Proc:0x0000000291b548@c:/usr/lib/ruby/2.0.0/irb.rb:430, @ltype=nil, @quoted=nil, @prevseek=0, @prevlineno=1, @prevcharno=0>
:e::x::i::t:exit
MATCH: end : ##>, "\u0004"=>#>, "\u001A"=>#>, " "=>#>, "\t"=>#>, "\f"=>#>, "\r"=>#>, "\v"=>#>, "#"=>#>, "="=>######, @postproc=#Proc:0x00000002e9fb18@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:359>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>}, @preproc=nil, @postproc=nil>, "="=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "~"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "\n"=>#>, ""=>#<IRB::SLex::Node:0x00000002e9e4c0 @Tree={""=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "<"=>##"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "<"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e949e8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:406>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, ">"=>##>, ">"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "!"=>##>, "~"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e9e858@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:395>, "'"=>#>, "\""=>#>, "`"=>#>, "?"=>#>, "&"=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "|"=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e8f6c8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:464>, "+"=>##>, "@"=>#, @postproc=#Proc:0x00000002e85740@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:478>}, @preproc=nil, @postproc=#Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>, "-"=>##>, "@"=>#, @postproc=#Proc:0x00000002e85150@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:484>}, @preproc=nil, @postproc=#Proc:0x00000002e843b8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:490>, ""=>#<IRB::SLex::Node:0x00000002e87298 @Tree={"="=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e7e120@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:578>, "."=>###>}, @preproc=nil, @postproc=#Proc:0x00000002e7fc00@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:521>}, @preproc=nil, @postproc=#Proc:0x00000002e7ff20@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:508>, "]"=>#>, "}"=>#>, ")"=>#>, ":"=>##>}, @preproc=nil, @postproc=#Proc:0x00000002e7ead0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:539>, "/"=>#>, ","=>#>, ";"=>#>, "~"=>##, @postproc=#Proc:0x00000002e7d388@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:612>}, @preproc=nil, @postproc=#Proc:0x00000002e7d770@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:606>, "("=>#>, "["=>###, @postproc=#Proc:0x00000002e7c870@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:638>}, @preproc=#Proc:0x00000002e7cc58@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632, @postproc=#Proc:0x00000002e7cc30@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:632>}, @preproc=nil, @postproc=#Proc:0x00000002e7c4d8@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:644>, "{"=>#>, "\"=>#>, "%"=>#>, "$"=>#>, "@"=>#>}, @preproc=nil, @postproc=#Proc:0x00000002e775f0@c:/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:728>>, @io=#, @stdout=#, @prompt="irb(main):001:0> ">, @input=#Proc:0x0000000291b520@c:/usr/lib/ruby/2.0.0/irb.rb:457, @seek=4, @lineno=1, @explineno=1, @basecharno=0, @charno=4, @rests=["\n"], @readed=["e", "x", "i", "t"], @herereaded=[], @indent=0, @indentstack=[], @lexstate=:EXPRARG, @spaceseen=false, @hereheader=false, @continue=false, @line="", @skipspace=false, @readedautocleanup=false, @exceptiononsyntaxerror=false, @prompt=#Proc:0x0000000291b548@c:/usr/lib/ruby/2.0.0/irb.rb:430, @ltype=nil, @quoted=nil, @prevseek=0, @prevlineno=1, @prevcharno=0>
\n

I think the patch https://bugs.ruby-lang.org/attachments/2611/irb_debug_level.patch should be applied for init.rb.

#6 Updated by Keiju Ishitsuka over 1 year ago

phasis68 (Heesob Park) wrote:

After the changeset r38611, the output of irb is too verbose by default.

Sorry, I have updated again.

Also available in: Atom PDF