Use IO's encoding instead of Encoding.default_external#765
Use IO's encoding instead of Encoding.default_external#765tompng merged 4 commits intoruby:masterfrom
Conversation
|
|
||
| def encoding | ||
| Encoding.default_external | ||
| @input.external_encoding || Encoding.default_external |
There was a problem hiding this comment.
This change fails one of irb's test. Should be fixed by ruby/irb#1022
lib/reline/line_editor.rb
Outdated
| @@ -138,7 +142,7 @@ def set_pasting_state(in_pasting) | |||
|
|
|||
| def reset(prompt = '', encoding:) | |||
There was a problem hiding this comment.
The parameter encoding: can be also removed
There was a problem hiding this comment.
💦 Thanks! Removed!
0be4085 to
ae219e8
Compare
|
FYI, one of irb's integration test seems to randomly fail. https://github.com/ruby/reline/actions/runs/11424348590/job/31784575039 |
I think it is not related to this change. |
tompng
left a comment
There was a problem hiding this comment.
Looks good. Thank you 👍
STDIN.gets returns string with STDIN's encoding. Reline now aligns with it.
(ruby/reline#765) * use IO's encoding * refactoring * remove unused encoding params * (for retriggering CI) remove unused encoding params ruby/reline@f09772adab
Fix #755. Use IO object's encoding to separate from global
Encoding.default_external.For example:
and get
UTF-8: