# RVAL2CBOOL vs RTEST

**URL:** <https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326>\
**Category:** Ruby-Gnome 2\
**Created:** [July 13, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326 "2007-07-13T14:11:18Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/1 "2007-07-13T14:11:18Z")

</div>

I’ve counted 88 uses of RVAL2CBOOL and 401 uses of RTEST in the code.  
As RVAL2CBOOL is defined to use RTEST, I think we should should choose  
either one, and then use only one form. RTEST is more rubyish but  
RVAL2CBOOL makes sense as long as we also use CBOOL2RVAL.

What do you think?

–  
Guillaume C. - [http://zarb.org/~gc/](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/2 "2007-07-13T16:24:45Z")

</div>

Hi

On Fri, 13 Jul 2007 14:10:55 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve counted 88 uses of RVAL2CBOOL and 401 uses of RTEST in the code.  
> As RVAL2CBOOL is defined to use RTEST, I think we should should choose  
> either one, and then use only one form. RTEST is more rubyish but  
> RVAL2CBOOL makes sense as long as we also use CBOOL2RVAL.
> 
> What do you think?

RVAL2CBOOL is better.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/3 "2007-07-13T16:29:45Z")

</div>

On 7/13/07, Masao M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > What do you think?
> 
> RVAL2CBOOL is better.

May I go ahead and substitute all uses of RTEST by uses of RVAL2CBOOL?

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/4 "2007-07-13T16:34:46Z")

</div>

Hi,

On Fri, 13 Jul 2007 16:29:18 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > What do you think?
> > 
> > RVAL2CBOOL is better.
> 
> May I go ahead and substitute all uses of RTEST by uses of RVAL2CBOOL?

Yes. Please send your patch here like CBOOL2RVAL.  
I’ll check it.

Thanks in advance.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/5 "2007-07-13T16:59:50Z")

</div>

> > May I go ahead and substitute all uses of RTEST by uses of RVAL2CBOOL?
> 
> Yes. Please send your patch here like CBOOL2RVAL.  
> I’ll check it.

Attached. But it’s rather long 🙂

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/6 "2007-07-13T17:54:56Z")

</div>

Hi,

On Fri, 13 Jul 2007 16:59:08 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > May I go ahead and substitute all uses of RTEST by uses of RVAL2CBOOL?
> > 
> > Yes. Please send your patch here like CBOOL2RVAL.  
> > I’ll check it.
> 
> Attached. But it’s rather long 🙂

I could check 20% of the file :-\<.  
Did you convert them automatically by tool(perl?) ?

If so, I think it’s no problem. Check it in CVS, please.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/7 "2007-07-13T18:07:00Z")

</div>

> I could check 20% of the file :-\<.  
> Did you convert them automatically by tool(perl?) ?

Yes:

# perl -pi -e ‘s/\bRTEST\b/RVAL2CBOOL/g’ `find -name *.c`

With the \b word boundaries, and checking that it compiles well, there  
should be little reasons for bugs 🙂

> If so, I think it’s no problem. Check it in CVS, please.

Thanks!

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/8 "2007-07-13T18:15:02Z")

</div>

Hi Guillaume,

Thanks. But update ChangeLogs by hand, please.

I’m afraid your changes will be forgot by me.  
Because I won’t use cvs tools to update NEWS/Changelogs.

On Fri, 13 Jul 2007 18:06:06 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > If so, I think it’s no problem. Check it in CVS, please.  
> > [http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 7:14pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/9 "2007-07-13T19:14:11Z")

</div>

Hi,

On Fri, 13 Jul 2007 18:27:43 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> about it. You may reply and tell what you think about it.  
> As I said, I don’t change the policy now.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/10 "2007-07-13T20:34:25Z")

</div>

> > Don’t worry, I plan to update ChangeLog will all the missing entries  
> > once we can decide what to do about it. For that to progress, please  
> > see my latest mail in the appropriate thread, I’m written a proposal  
> > about it. You may reply and tell what you think about it.
> 
> As I said, I don’t change the policy now.

It’s not even possible to consider adding the time next to the date  
for each changelog entry?

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/11 "2007-07-13T18:28:03Z")

</div>

On 7/13/07, Masao M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Guillaume,
> 
> Thanks. But update ChangeLogs by hand, please.
> 
> I’m afraid your changes will be forgot by me.

Don’t worry, I plan to update ChangeLog will all the missing entries  
once we can decide what to do about it. For that to progress, please  
see my latest mail in the appropriate thread, I’m written a proposal  
about it. You may reply and tell what you think about it.

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 14, 2007, 7:45am UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/12 "2007-07-14T07:45:33Z")

</div>

Hi,

From: Masao M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 13 Jul 2007 23:23:24 +0900

> > What do you think?
> 
> RVAL2CBOOL is better.

I think RTEST is better.

RTEST is well-known to ruby programmers and using existing name  
enables utilization of their knowledge compared with using invented  
new name.

– Masahiro S.

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 14, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/13 "2007-07-14T14:21:57Z")

</div>

> > It’s not even possible to consider adding the time next to the date  
> > for each changelog entry?
> 
> If you want to discuss about it, I welcome it.  
> But the discussion will start after you keep to follow our current rule first.

It’s not logical, because it makes me do something now, which will  
maybe be useless once the discussion is finished… But you’re the  
boss, so be it.

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 14, 2007, 3:56am UTC](https://www.ruby-forum.com/t/rval2cbool-vs-rtest/109326/14 "2007-07-14T03:56:13Z")

</div>

Hi,

On Fri, 13 Jul 2007 20:33:35 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > Don’t worry, I plan to update ChangeLog will all the missing entries  
> > > once we can decide what to do about it. For that to progress, please  
> > > see my latest mail in the appropriate thread, I’m written a proposal  
> > > about it. You may reply and tell what you think about it.
> > 
> > As I said, I don’t change the policy now.
> 
> It’s not even possible to consider adding the time next to the date  
> for each changelog entry?

If you want to discuss about it, I welcome it.  
But the discussion will start after you keep to follow our current rule  
first.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
