diff options
Diffstat (limited to 'include/ruby/internal/symbol.h')
-rw-r--r-- | include/ruby/internal/symbol.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ruby/internal/symbol.h b/include/ruby/internal/symbol.h index 594652151a..3ffc5abc2b 100644 --- a/include/ruby/internal/symbol.h +++ b/include/ruby/internal/symbol.h @@ -121,10 +121,13 @@ ID rb_intern_str(VALUE str); * Retrieves the name mapped to the given id. * * @param[in] id An id to query. - * @retval NULL No such id ever existed in the history. + * @retval NULL Unknown id. * @retval otherwise A name that the id represents. * @note The return value is managed by the interpreter. Don't pass it * to free(). + * @note The underlying name can contain internal NUL bytes, so the return + * value might be a truncated representation due to the nature of C + * strings. * @note This C string is backed by an underlying Ruby string. The Ruby * string may move during GC compaction which would make this * C string point to invalid memory. Do not use the return value |