Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch upstream #6

Merged
merged 7 commits into from
Jun 22, 2021
Merged
4 changes: 4 additions & 0 deletions test/readline/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ def use_lib_reline # Use lib/reline as Readline
Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
Object.const_set(:Readline, Reline)
end

def finish_using_lib_reline
Reline.instance_variable_set(:@core, nil)
end
end
7 changes: 6 additions & 1 deletion test/readline/test_readline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,16 @@ def setup
super
end

def teardown
finish_using_lib_reline
super
end

def get_default_internal_encoding
if RUBY_PLATFORM =~ /mswin|mingw/
Encoding.default_internal || Encoding::UTF_8
else
super
Reline::IOGate.encoding
end
end
end if defined?(Reline) && ENV["TEST_READLINE_OR_RELINE"] != "Readline"
7 changes: 6 additions & 1 deletion test/readline/test_readline_history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,16 @@ def setup
super
end

def teardown
finish_using_lib_reline
super
end

def get_default_internal_encoding
if RUBY_PLATFORM =~ /mswin|mingw/
Encoding.default_internal || Encoding::UTF_8
else
super
Reline::IOGate.encoding
end
end
end if defined?(Reline) && ENV["TEST_READLINE_OR_RELINE"] != "Readline"