Skip to content

Commit 0a52548

Browse files
committed
Make Whisper::Context#full and full_parallel return self
1 parent 3f85151 commit 0a52548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bindings/ruby/ext/ruby_whisper_context.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ VALUE ruby_whisper_full(int argc, VALUE *argv, VALUE self)
299299
register_callbacks(rwp, &self);
300300
const int result = whisper_full(rw->context, rwp->params, c_samples, n_samples);
301301
if (0 == result) {
302-
return Qnil;
302+
return self;
303303
} else {
304304
rb_exc_raise(rb_funcall(eError, id_new, 1, result));
305305
}
@@ -390,7 +390,7 @@ ruby_whisper_full_parallel(int argc, VALUE *argv,VALUE self)
390390
register_callbacks(rwp, &self);
391391
const int result = whisper_full_parallel(rw->context, rwp->params, c_samples, n_samples, n_processors);
392392
if (0 == result) {
393-
return Qnil;
393+
return self;
394394
} else {
395395
rb_exc_raise(rb_funcall(eError, id_new, 1, result));
396396
}

0 commit comments

Comments
 (0)