Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/guides/mrbconf.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ end
pairs with one other. Without this macro it folds ASCII letters, and a
pattern holding a character that needs one of the Unicode foldings raises
`RegexpError` rather than answering as if the character had no case.
- `MRB_USE_ASCII_CASE` narrows the case half back to ASCII, leaving the
indexing.
- `MRB_USE_ASCII_CASE` narrows the case half back to ASCII, taking the refusal
with it and leaving the indexing.
- If it isn't defined, they only support the US-ASCII encoding.

`MRB_USE_ASCII_CASE`
Expand All @@ -237,6 +237,10 @@ end
- Drops the Unicode case table the build would otherwise carry. That is what
the option is for: a target counting its bytes buys the UTF-8 indexing of
`MRB_UTF8_STRING` without the table beside it.
- Bytes that spell no character are handed back as they stand rather than
refused with `ArgumentError`. That refusal belongs to the walk over
characters, which is the walk this narrows away: what converts instead reads
bytes, and reading bytes asks nothing about what they spell.
- The regexp `i` flag reads that table too, so it narrows with the rest: it
folds ASCII letters, and a pattern holding a character that needs one of the
Unicode foldings raises `RegexpError` rather than answering as if the
Expand Down
4 changes: 3 additions & 1 deletion doc/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ mruby does not have an `Encoding` class. Strings are treated as
byte sequences by default. UTF-8 aware string operations can be
enabled with the `MRB_UTF8_STRING` compile flag, which is also what
makes case conversion follow Unicode rather than ASCII; `MRB_USE_ASCII_CASE`
narrows that half back without giving up the indexing.
narrows that half back without giving up the indexing. A Unicode conversion
refuses bytes that spell no character with `ArgumentError`; one narrowed to
ASCII reads no characters and hands those bytes back untouched.

## Integer Precision Varies by Boxing Mode

Expand Down
Loading