From: "Thairuby ->a, b {a + b}" Date: 2009-09-28T01:54:25+09:00 Subject: Re: handling of regexp objects that aren't referenced by variables, arrays, tables or objects Is this ok? But it still use variable :( file.each_line { |line| if line =~ (a ||= $line_patterns["pattern a"]) process_pattern_a(line) elsif line =~ (b ||= $line_patterns["pattern b"]) process_pattern_b(line) # some more elsifs end } -- Posted via http://www.ruby-forum.com/.