fix(ruby): return false instead of rb_raise in memory_view callback

rb_memory_view_get_func_t callbacks should communicate errors via
return value (false), not exceptions. rb_memory_view_get has no
exception-handling wrapper around get_func calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
OrbisAI Security 2026-04-20 09:09:19 +05:30
parent f170d48777
commit 0723001fc5
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ jfk_reader_get_memory_view(const VALUE obj, rb_memory_view_t *view, int flags)
if (file == NULL) {
xfree(samples);
xfree(data);
rb_raise(rb_eIOError, "failed to open audio file");
return false;
}
fseek(file, 78, SEEK_SET);