-
Notifications
You must be signed in to change notification settings - Fork 85
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
Use IO's encoding instead of Encoding.default_external #765
Conversation
@@ -41,7 +41,7 @@ def initialize | |||
end | |||
|
|||
def encoding | |||
Encoding.default_external | |||
@input.external_encoding || Encoding.default_external |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter encoding:
can be also removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💦 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
: