# Elegant way to say "try this thing, one at a time, until condition is met"

**URL:** <https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836>\
**Category:** ruby-talk\
**Created:** [31 May 2004 08:31 UTC](https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836 "2004-05-31T08:31:24Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://rubytalk.org/u/Robert)\
**Post date:** [1 June 2004 13:18 UTC](https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836/21 "2004-06-01T13:18:41Z")

</div>

“David Garamond” [lists@zara.6.isreserved.com](mailto:lists@zara.6.isreserved.com) schrieb im Newsbeitrag  
[news:40BC7F27.1050209@zara.6.isreserved.com](mailto:news:40BC7F27.1050209@zara.6.isreserved.com)…

> Robert Klemme wrote:
> 
> > > Thankfully in Ruby  
> > > things are simplified: nil and false values are always false,  
> > > everything  
> > > else is true.
> 
> Alas, I actually didn’t even think about C when writing this 🙂 Was  
> comparing it to Python, PHP, Perl, etc. on my mind.

Ah, I see. Actually I was still referring to Dimitri’s posting where he  
talked about his “damn C background”. I just wanted to make it very clear  
that it’s a bad idea to write such code _especially_ in C. So C  
background shouldn’t be used as an excuse for this idiom. 🙂

Kind regards

```
robert

```

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [1 June 2004 13:55 UTC](https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836/22 "2004-06-01T13:55:40Z")

</div>

gateway test…

test

test

> **···**
>
> –  
> David A. Black  
> [dblack@wobblini.net](mailto:dblack@wobblini.net)

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [1 June 2004 14:07 UTC](https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836/23 "2004-06-01T14:07:57Z")

</div>

gateway test…

test

test

> **···**
>
> –  
> David A. Black  
> [dblack@wobblini.net](mailto:dblack@wobblini.net)

[Previous page](https://rubytalk.org/t/elegant-way-to-say-try-this-thing-one-at-a-time-until-condition-is-met/11836.md?page=1)
