You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code snippets are loaded with the encoding defined in the environment.
Details
This also applies to Rules, Checks, and commands defined in commands/.
An initial step would be to interpret the contents as UTF-8 (which Ruby defaults to anyway), but a better approach would be to infer the encoding from the initial line, looking for encoding/coding.
Steps to reproduce
lib/
(e.g.🔥 = 'hot'
)Expected behavior
No crash.
Code snippets are loaded with the explicitly stated encoding at the top of the file (e.g.
# encoding: utf-8
), or UTF-8 if no encoding is specified.Actual behavior
Crash.
Code snippets are loaded with the encoding defined in the environment.
Details
This also applies to Rules, Checks, and commands defined in
commands/
.An initial step would be to interpret the contents as UTF-8 (which Ruby defaults to anyway), but a better approach would be to infer the encoding from the initial line, looking for
encoding
/coding
.CC @josh-
The text was updated successfully, but these errors were encountered: