diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index f59a23a99d..34bceea54f 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -91,7 +91,7 @@ module TestIRB end def test_prompt_n_deprecation - irb = IRB::Irb.new(IRB::WorkSpace.new(Object.new)) + irb = IRB::Irb.new(IRB::WorkSpace.new(Object.new), TestInputMethod.new) _, err = capture_output do irb.context.prompt_n = "foo" diff --git a/test/irb/test_input_method.rb b/test/irb/test_input_method.rb index ea7efb5dd5..b516be5e3c 100644 --- a/test/irb/test_input_method.rb +++ b/test/irb/test_input_method.rb @@ -15,6 +15,8 @@ module TestIRB def teardown IRB.conf.replace(@conf_backup) restore_encodings + # Reset Reline configuration overrided by RelineInputMethod. + Reline.instance_variable_set(:@core, nil) end def test_initialization diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb index 0c77bb0f76..4e5a94b1be 100644 --- a/test/irb/test_irb.rb +++ b/test/irb/test_irb.rb @@ -738,7 +738,7 @@ module TestIRB workspace = IRB::WorkSpace.new(TOPLEVEL_BINDING.dup) IRB.conf[:VERBOSE] = false - IRB::Irb.new(workspace) + IRB::Irb.new(workspace, TestInputMethod.new) end end end diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 09344e1b0e..b9e55c7330 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -222,7 +222,7 @@ module TestIRB end IRB.conf[:VERBOSE] = false - IRB::Context.new(nil, workspace) + IRB::Context.new(nil, workspace, TestInputMethod.new) end def assert_indent_level(lines, expected, local_variables: [])