ruby-changes:26560
From: keiju <ko1@a...>
Date: Wed, 26 Dec 2012 01:35:16 +0900 (JST)
Subject: [ruby-changes:26560] keiju:r38611 (trunk): * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level=
keiju 2012-12-26 01:35:04 +0900 (Wed, 26 Dec 2012) New Revision: 38611 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38611 Log: * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level= [Bug #6301] and fix irb command option: -- irb_debug_level for irb. Modified files: trunk/ChangeLog trunk/lib/irb/context.rb trunk/lib/irb/init.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 38610) +++ ChangeLog (revision 38611) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 26 01:31:16 2012 Keiju Ishitsuka <keiju@i...> + + * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level= + [Bug #6301] and fix irb command option: -- irb_debug_level for irb. + Wed Dec 26 00:59:18 2012 Keiju Ishitsuka <keiju@i...> * lib/irb/ruby-lex.rb: improve RubyLex performance for large files Index: lib/irb/context.rb =================================================================== --- lib/irb/context.rb (revision 38610) +++ lib/irb/context.rb (revision 38611) @@ -100,7 +100,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/context.rb#L100 if @echo.nil? @echo = true end - @debug_level = IRB.conf[:DEBUG_LEVEL] + self.debug_level = IRB.conf[:DEBUG_LEVEL] end # The top-level workspace, see WorkSpace#main @@ -360,7 +360,6 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/context.rb#L360 def debug_level=(value) @debug_level = value RubyLex.debug_level = value - SLex.debug_level = value end # Whether or not debug mode is enabled, see #debug_level=. Index: lib/irb/init.rb =================================================================== --- lib/irb/init.rb (revision 38610) +++ lib/irb/init.rb (revision 38611) @@ -197,7 +197,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/init.rb#L197 @CONF[:CONTEXT_MODE] = ($1 || ARGV.shift).to_i when "--single-irb" @CONF[:SINGLE_IRB] = true - when /^--irb_debug=(?:=(.+))?/ + when /^--irb_debug(?:=(.+))?/ @CONF[:DEBUG_LEVEL] = ($1 || ARGV.shift).to_i when "-v", "--version" print IRB.version, "\n" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/