Skip to content

Commit

Permalink
Fix RELINE_TEST_ENCODING
Browse files Browse the repository at this point in the history
It was not working because it was not environment variable.
  • Loading branch information
ima1zumi committed Sep 4, 2024
1 parent 66291b5 commit cfbb405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/reline/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
end

module Reline
class <<self
class << self
def test_mode(ansi: false)
@original_iogate = IOGate

if ENV['RELINE_TEST_ENCODING']
encoding = Encoding.find(ENV['RELINE_TEST_ENCODING'])
if Reline.const_defined?(:RELINE_TEST_ENCODING) && RELINE_TEST_ENCODING.is_a?(Encoding)
encoding = RELINE_TEST_ENCODING
else
encoding = Encoding::UTF_8
end
Expand Down

0 comments on commit cfbb405

Please sign in to comment.