From: Volkan Civelek Date: 2006-07-01T09:59:04+09:00 Subject: Puzzled on the MatchData Hi, I have a question... Why the below snippet, ["foo","bar","baz"].each do |s| m = /^ba(.*?)$/.match(s) puts m[0] end gives the following error? test.rb:8: undefined method `[]' for nil:NilClass (NoMethodError) Regards, Volkan -- Posted via http://www.ruby-forum.com/.