From: Shugo Maeda Date: 2001-03-07T14:40:02+09:00 Subject: [ruby-talk:12208] Re: Ruby API function to check for "true"-ness? At Tue, 6 Mar 2001 17:35:21 -0600, Lyle Johnson wrote: > and some typical responses would be: > > rb_is_true(Qtrue) = 1 > rb_is_true(Qfalse) = 0 > rb_is_true(UINT2NUM(1)) = 1 > rb_is_true(UINT2NUM(0)) = 0 rb_is_true(UINT2NUM(0)) should not return 0, because 0 does not mean false in Ruby. Indeed, RTEST(UINT2NUM(0)) returns 1. # RTEST(Qnil) returns 0. Shugo