Skip to content

Assume that rbs files are encoded in UTF-8 - #493

Merged
soutaro merged 1 commit into
ruby:masterfrom
mame:rbs-utf-8
Nov 30, 2020
Merged

Assume that rbs files are encoded in UTF-8#493
soutaro merged 1 commit into
ruby:masterfrom
mame:rbs-utf-8

Conversation

@mame

@mame mame commented Nov 27, 2020

Copy link
Copy Markdown
Member

Formerly, rake fails when LANG=C because ruby assumes the input files
are encoded in US-ASCII.

By this change, all rbs files are read as UTF-8.
Nowadays, I think a major part of ruby (and RBS) code are in UTF-8. So
this gives good first aid for the issue.

A magic comment like # encoding: something may be needed in RBS as
well as ruby code, but I think it requires further discussion.

Formerly, rake fails when `LANG=C` because ruby assumes the input files
are encoded in US-ASCII.

By this change, all rbs files are read as UTF-8.
Nowadays, I think a major part of ruby (and RBS) code are in UTF-8. So
this gives good first aid for the issue.

A magic comment like `# encoding: something` may be needed in RBS as
well as ruby code, but I think it requires further discussion.

@soutaro soutaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants