----- Original Message ----- 
From: "MikkelFJ" <mikkelfj-anti-spam / bigfoot.com>


> 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

window.caption = (files[current_item] ||= "Untitled")

Gavin