A similar problem:
case key.strip
                when "c" "Synopsis"
                when "s" "Category"
                when "io" "Inputs and outputs"
                when "processing" "Processing type"
                when "d" "Description"
                when "n" "Notes"
                when "e" "Examples"
                when "h" "Element handlers"
                when "a" "See also"
                else puts "Unknown key"
        end
        if key.strip == "a"
                puts "This gives output"
        end
unknown key
This gives output

What am I doing wrong? I'm a really Ruby newbie so probably I'm looking at
it the wrong way...
-- 
"May the source be with you"