Actions
Feature #11936
closedAllow ERB subclass to add token easily
Description
While I want to use ERB in Rails, escape token "<%==" is not available in ERB and we can't add a new token to ERB easily.
To allow ERB subclass to add a new token easily, I splitted ERB::Compiler#compile to some small methods and created ERB::Compiler::Scanner#stags and ERB::Compiler::Scanner#etags.
With this patch, we'll be able to add a new stag or etag by overriding these methods.
sample.rb is a sample to create ERB subclass with "<%==" token.
Files
Updated by k0kubun (Takashi Kokubun) almost 9 years ago
- File 0001-Allow-ERB-subclass-to-add-token-easily.patch 0001-Allow-ERB-subclass-to-add-token-easily.patch added
I fixed a patch to reduce times to compile the same regexp in TrimScanner.
Updated by k0kubun (Takashi Kokubun) almost 9 years ago
- File deleted (
0001-Allow-ERB-subclass-to-add-token-easily.patch)
Updated by seki (Masatoshi Seki) almost 9 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0Like0