[前][次][番号順一覧][スレッド一覧]

ruby-changes:55767

From: Takashi <ko1@a...>
Date: Tue, 21 May 2019 20:33:40 +0900 (JST)
Subject: [ruby-changes:55767] Takashi Kokubun: 32ed85f601 (trunk): Copy config to make IRB::Context#use_colorize? functional

https://git.ruby-lang.org/ruby.git/commit/?id=32ed85f601

From 32ed85f601d2102990b62102c5f3b322306b1928 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Tue, 21 May 2019 04:32:15 -0700
Subject: Copy config to make IRB::Context#use_colorize? functional

on initialize

This fixes https://github.com/ruby/ruby/pull/2188

diff --git a/lib/irb/context.rb b/lib/irb/context.rb
index 749130e..7037b2b 100644
--- a/lib/irb/context.rb
+++ b/lib/irb/context.rb
@@ -40,6 +40,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/context.rb#L40
       @load_modules = IRB.conf[:LOAD_MODULES]
 
       @use_readline = IRB.conf[:USE_READLINE]
+      @use_colorize = IRB.conf[:USE_COLORIZE]
       @verbose = IRB.conf[:VERBOSE]
       @io = nil
 
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb
index 469599c..96e6fbf 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -75,5 +75,9 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L75
     ensure
       $VERBOSE = verbose
     end
+
+    def test_default_config
+      assert_equal(true, @context.use_colorize?)
+    end
   end
 end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]