From: "Mikael Høilund" Date: 2008-06-12T07:27:36+09:00 Subject: Re: Keyword parameters On Jun 11, 2008, at 21:21, Glenn wrote: > [T]o do something like iterate through the hash and turn all of the > symbol keys into local variable with their respective values? No. What you *can* do, however, is to simply refer to each of these options directly in the hash, making the hash values default instead. The naïve way: options[:a] ||= 5 ... However, a more preferable way, however, is defining a hash with the default, and then letting the options hash override these: options = {:a => 5, ...}.merge(options) You can then access each option as option[:a] .... There are a few caveat with this, but these aren't usually a problem. -- Mikael Høilund http://hoilund.org/