Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Neither of these really matter, but:
When converting to hex, if you loop through ascii with String#each_byte instead of String#each_char, you'll save yourself an extra call to #ord.
Also, when converting to ASCII, your regex doesn't need to handle strings of length 1. All ASCII characters are stored as two hex digits. Otherwise, it'd be impossible to tell whether strings like "0x09" meant "0x0009" ("NULL ") or "0x09" (" ").