"MikkelFJ" <mikkelfj-anti-spam / bigfoot.com> wrote in message
news:3d938793$0$70352$edfadb0f / dspool01.news.tele.dk...
> Wouldn't it be useful with a missing value in hash tables so you avoid the
> nil value and having to test for this?
>
> files = { "item1" => "myfile.rb", "item2" => "mytestdata", missing_value
=>
> "Untitled"}
> window.caption = files[current_item]
>
> (this is probably implemented or conflicts with something, this is what
> happens to all my wouldn't it be nice....)

As an extension or alternative to this, what about a two value assigment
where the second value is assigned if the first value is false or nil:

files = { "item1" => "myfile.rb", "item2" => "mytestdata"}
window.caption = files[current_item] alternative "Untitled"
or
window.caption = files[current_item] \/ "Untitled"

Mikkel