Project

General

Profile

Actions

Bug #6301

closed

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

Added by sho-h (Sho Hashimoto) about 12 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
Backport:
[ruby-dev:45517]

Description

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

conf.debug_level = "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.debug_level を代入するのを止めるか、debug_level を追加するのがよいのではないかと思いました。

--- lib/irb/context.rb (revision 35336)
+++ lib/irb/context.rb (working copy)
@@ -242,7 +242,6 @@
def debug_level=(value)
@debug_level = value
RubyLex.debug_level = value

  •  SLex.debug_level = value
    

    end

    def debug?


Files

irb_debug_level.patch (824 Bytes) irb_debug_level.patch sho-h (Sho Hashimoto), 04/16/2012 11:38 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0