From: "Florian Aßmann" Date: 2007-06-27T01:41:10+09:00 Subject: Re: [QUIZ][SOLUTION] LSRC Name Picker (#129) Florian Aßmann schrieb: > Hi, > > my minimalistic approach uses the main.rb as data storage with the > __END__ keyword. So I don't need any 3rd party libs doing the > persistence stuff for me. I also tried to build a GUI but shattered a > whole day on wxRuby. > > Features: > * persitence + test suite > * multiple picks > > ruby main.rb --pick 2 > > * eats everything, not just names, just needs TSV with header (see > example.tsv) > > * no sql, no extra files > * reads Tab-Separated-Values from stdin or file > > cat example.tsv | ruby main.rb --list unlucky > > ruby main.rb --list unlucky --from example.tsv > > * ... > > What so ever, have a try... :D > > Cheers > Florian > I found a flaw in lucky_filter.rb when processing empty values, just replace at lucky_filter.rb#20: - @attendees[ key ] = row.map { |value| value.strip } + @attendees[ key ] = row.map { |value| value.to_s.strip } God bless duck typing :D Sincerely Florian