Skip to content

Commit f1d1da2

Browse files
committed
Fix wrong return type in C wrapper functions.
1 parent 939c522 commit f1d1da2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/c/cext/ruby.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ int rb_obj_method_arity(VALUE object, ID id) {
495495
}
496496

497497
int rb_obj_respond_to(VALUE object, ID id, int priv) {
498-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_obj_respond_to", rb_tr_unwrap(object), rb_tr_unwrap(id), priv));
498+
return polyglot_as_boolean(polyglot_invoke(RUBY_CEXT, "rb_obj_respond_to", rb_tr_unwrap(object), rb_tr_unwrap(id), priv));
499499
}
500500

501501
int rb_special_const_p(VALUE object) {
@@ -2640,11 +2640,11 @@ VALUE rb_get_path(VALUE object) {
26402640
}
26412641

26422642
int rb_tr_readable(int mode) {
2643-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_tr_readable", mode));
2643+
return polyglot_as_boolean(polyglot_invoke(RUBY_CEXT, "rb_tr_readable", mode));
26442644
}
26452645

26462646
int rb_tr_writable(int mode) {
2647-
return polyglot_as_i32(polyglot_invoke(RUBY_CEXT, "rb_tr_writable", mode));
2647+
return polyglot_as_boolean(polyglot_invoke(RUBY_CEXT, "rb_tr_writable", mode));
26482648
}
26492649

26502650
MUST_INLINE

0 commit comments

Comments
 (0)