From b7d11c6942c40464280af331aa15e2361a55d6d3 Mon Sep 17 00:00:00 2001 From: keiju Date: Tue, 25 Dec 2012 16:35:04 +0000 Subject: * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level= [Bug #6301] and fix irb command option: -- irb_debug_level for irb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/context.rb | 3 +-- lib/irb/init.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 43d5364b4f..b44f8ca2fe 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -100,7 +100,7 @@ module IRB 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 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=. diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 159066bbce..2c3797f71f 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -197,7 +197,7 @@ module IRB # :nodoc: @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" -- cgit v1.2.3