#7 Schema#names fails on Multiple named entries.

open
nobody
None
5
2006-07-10
2006-07-10
David Morton
No

A schema definition such as NAME ( 'foo' 'bar' ) does
not get parsed correctly by Schema#names.

Here's a bit of code that works for me:

def names(key)
self[key].collect { |val|
if val =~ /NAME\s+'([\w\d_-]+)'/
$1
elsif val =~ /NAME\s+\(\s+'(.*)'\s+\)/
$1.split(/'\s+'/)
end
}.flatten
end

Discussion