From 6242a82c8f4cc6b68ba16d86aa22fd770e8ad195 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 11 Mar 2024 11:12:09 -0400 Subject: [PATCH] [ruby/prism] Provide more documentation for pm_integer_parse_digit_values https://github.com/ruby/prism/commit/c3fcb5031f --- prism/util/pm_integer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prism/util/pm_integer.c b/prism/util/pm_integer.c index 07fc0d55378150..8f8b75474df33a 100644 --- a/prism/util/pm_integer.c +++ b/prism/util/pm_integer.c @@ -223,6 +223,10 @@ karatsuba_multiply(pm_integer_t *destination, pm_integer_t *left, pm_integer_t * /** * The values of a hexadecimal digit, where the index is the ASCII character. + * Note that there's an odd exception here where _ is mapped to 0. This is + * because it's possible for us to end up trying to parse a number that has + * already had an error attached to it, and we want to provide _something_ to + * the user. */ static const int8_t pm_integer_parse_digit_values[256] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F