-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YAML compile cache: encoding aware symbols
Ref: msgpack/msgpack-ruby#211 The default msgpack Symbol packer/unpacker is not encoding aware which cause all non-ASCII symbols to be unpacked with ASCII-8BIT encoding aka BINARY. So we define a custom packer that prefix the symbol name with the encoding index. Note that the encoding index isn't fixed across ruby platforms and version, but the cache versioning should protect us from that. An alternative could be to simply assume non-ASCII symbols are UTF-8, but it wouldn't work for people with non UTF-8 source files.
- Loading branch information
Showing
4 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters