Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
This works: ... (field1, field2, field3, field4, field5) = line.split(/\s+/) if field1 =~ /^is-/ then puts "field1 #{field1} ${field5}" end -------------------------------------- this doesn't ... (field1, field2, field3, field4, field5) = line.split(/\s+/) if field1.match('/^is-/') then puts "field1 #{field1} ${field5}" end Get the following message: ./dbparse-phase1.rb:18: undefined method `match' for nil:NilClass (NoMethodError)
From the Design Piracy series on my blog: