Jeremy Tregunna
8/14/2006 6:48:00 PM
On 06-08-14, at 14:39, Jeremy Tregunna wrote:
>
> On 06-08-14, at 12:42, Peter Bailey wrote:
>
>> Hello,
>> I get the following error message from RUBY when I try to run the
>> script
>> shown below. Sorry, the hash is huge.
>>
>> I need to match the beginning of file names with the keys in a
>> hash. If
>> there's a match, then I need to pull the value for that matching key.
>> That's all really.
>>
>> Error:
>> test2.rb:7: parse error, unexpected kEND, expecting '}'
>>
>> [snip]
>>
>> 4 psfiles = Dir.glob("*.ps")
>> 5 psfiles.each do |psfile|
>> 6 filehash.each { |key, value| puts "#{value}" if
>> File.fnmatch('#{key}*', #{psfile}) } # <-- that last } should be
>> an end, or the do above should be a {
Bah disregard, still sleepy. Sorry for the noise.
--
Jeremy Tregunna
jtregunna@blurgle.ca
"One serious obstacle to the adoption of good programming languages
is the notion that everything has to be sacrificed for speed. In
computer languages as in life, speed kills." -- Mike Vanier