diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-21 04:32:15 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-21 04:32:17 -0700 |
commit | 32ed85f601d2102990b62102c5f3b322306b1928 (patch) | |
tree | 904fd9d14c9240c6962140ea0bc62d1af02eb272 | |
parent | 4613c4bd5c22acb675ec385f4e0fa27ec7ad59ab (diff) | |
download | ruby-32ed85f601d2102990b62102c5f3b322306b1928.tar.gz |
Copy config to make IRB::Context#use_colorize? functional
on initialize
This fixes https://github.com/ruby/ruby/pull/2188
-rw-r--r-- | lib/irb/context.rb | 1 | ||||
-rw-r--r-- | test/irb/test_context.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 749130edb2..7037b2bd66 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -40,6 +40,7 @@ module IRB @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 469599c11b..96e6fbfc61 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -75,5 +75,9 @@ module TestIRB ensure $VERBOSE = verbose end + + def test_default_config + assert_equal(true, @context.use_colorize?) + end end end |