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:
parent
f170d48777
commit
0723001fc5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue