From: merch-redmine@... Date: 2016-01-28T21:41:18+00:00 Subject: [ruby-core:73561] [Ruby trunk - Bug #12031] [Open] Make ERB work with --enable-frozen-string-literal Issue #12031 has been reported by Jeremy Evans. ---------------------------------------- Bug #12031: Make ERB work with --enable-frozen-string-literal https://bugs.ruby-lang.org/issues/12031 * Author: Jeremy Evans * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.4.0dev (2016-01-26) [i386-openbsd] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- ERB currently does not work with --enable-frozen-string-literal: ~~~ $ echo "a" | RUBYOPT=--enable-frozen-string-literal erb -:1:in `concat': can't modify frozen String (RuntimeError) from -:1:in `
' from /usr/local/lib/ruby/2.3/erb.rb:864:in `eval' from /usr/local/lib/ruby/2.3/erb.rb:864:in `result' from /usr/local/lib/ruby/2.3/erb.rb:846:in `run' from /usr/local/bin/erb23:149:in `run' from /usr/local/bin/erb23:170:in `
' ~~~ The attached patch makes it work with --enable-frozen-string-literal: ~~~ $ echo "a" | RUBYOPT=--enable-frozen-string-literal RUBYLIB=~/ruby/lib erb a ~~~ ---Files-------------------------------- 0001-Make-ERB-work-with-enable-frozen-string-literal.patch (1.43 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: