From: takashikkbn@... Date: 2016-01-01T06:42:29+00:00 Subject: [ruby-core:72647] [Ruby trunk - Feature #11936] [Open] Allow ERB subclass to add token easily Issue #11936 has been reported by Takashi Kokubun. ---------------------------------------- Feature #11936: Allow ERB subclass to add token easily https://bugs.ruby-lang.org/issues/11936 * Author: Takashi Kokubun * Status: Open * Priority: Normal * Assignee: Masatoshi Seki ---------------------------------------- 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-------------------------------- 0001-Allow-ERB-subclass-to-add-token-easily.patch (8.4 KB) sample.rb (882 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: