Actions
Bug #12031
closedMake ERB work with --enable-frozen-string-literal
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-01-26) [i386-openbsd]
Description
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 `<main>'
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 `<main>'
The attached patch makes it work with --enable-frozen-string-literal:
$ echo "a" | RUBYOPT=--enable-frozen-string-literal RUBYLIB=~/ruby/lib erb
a
Files
Actions
Like0
Like0