From: Dmitry Nikiforov Date: 2012-02-03T11:21:21+09:00 Subject: Re: Basic Ruby performance Ryan Davis wrote in post #1043813: > IMHO re.match is just as useless as Regexp.new, Array.new, and Hash.new > (assuming no args/blocks passed). They're throwbacks to java devs and > serve no purpose but to make things more verbose. In this specific case, > there are tangible reasons to use =~ over #match. The reason I tried to use Regexp.new is because I figured it would pre-compile the regexp - the way "qr/ test /" in Perl would do, so that it doesn't have to re-compile it on every iteration. -- Posted via http://www.ruby-forum.com/.