From: "Eregon (Benoit Daloze)" Date: 2012-09-26T18:50:07+09:00 Subject: [ruby-core:47703] [ruby-trunk - Bug #7065] Syslog::Logger should have a formatter Issue #7065 has been updated by Eregon (Benoit Daloze). luislavena (Luis Lavena) wrote: > How about moving ansi regexp as constant so regexp object doesn't get allocated on every formatter.call? If I'm not mistaken this is unnecessary, as "static" (without #{...}) Regexps are created only once (because they are immutable): class Formatter def clean /\e\[[0-9;]*m/ end def clean2 />#{'a'*2}