Skip to content

Commit

Permalink
In Ruby CAPI "true" is Qtrue, not int 1,
Browse files Browse the repository at this point in the history
(VALUE) TRUE) means INT2FIX(0).
  • Loading branch information
nurse committed Aug 14, 2010
1 parent 80c50e6 commit bb9ccf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optional/capi/ext/symbol_spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ extern "C" {

#ifdef HAVE_RB_IS_CLASS_ID
VALUE symbol_spec_rb_is_class_id(VALUE self, VALUE sym) {
return rb_is_class_id(SYM2ID(sym));
return rb_is_class_id(SYM2ID(sym)) ? Qtrue : Qfalse;
}
#endif

#ifdef HAVE_RB_IS_CONST_ID
VALUE symbol_spec_rb_is_const_id(VALUE self, VALUE sym) {
return rb_is_const_id(SYM2ID(sym));
return rb_is_const_id(SYM2ID(sym)) ? Qtrue : Qfalse;
}
#endif

#ifdef HAVE_RB_IS_INSTANCE_ID
VALUE symbol_spec_rb_is_instance_id(VALUE self, VALUE sym) {
return rb_is_instance_id(SYM2ID(sym));
return rb_is_instance_id(SYM2ID(sym)) ? Qtrue : Qfalse;
}
#endif

Expand Down

0 comments on commit bb9ccf0

Please sign in to comment.