Issue #14194 has been updated by Eregon (Benoit Daloze). nobu (Nobuyoshi Nakada) wrote: > It doesn¡Çt seem harmful, and tests should be independent from the condition. I'm unsure, it forces existing code to add `# frozen_string_literal: false`, which seems not valuable if anyway the default is not going to change. E.g., I don't think it's a valuable change to add `# frozen_string_literal: false` at the top of every ruby/spec file for now (I'm rather against it). `--enable-frozen-string-literal` cab break existing code, so I think we should document that in the man page/--help, if we don't remove the flag. ---------------------------------------- Bug #14194: --enable-frozen-string-literal ruby runner.rb cgi https://bugs.ruby-lang.org/issues/14194#change-78788 * Author: MSP-Greg (Greg L) * Status: Feedback * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-12-17 trunk 61304) [x64-mingw32] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Assuming `--enable-frozen-string-literal`, `ruby runner.rb cgi` Running without patch: ``` 1) Failure: CGIMultipartTest#test_cgi_multipart_without_tempfile [E:/GitHub/ruby/test/cgi/test_cgi_multipart.rb:353]: 1. [2/2] Assertion for "stderr" | <[]> expected but was | <["-:20:in `gsub!': can't modify frozen String, created at -:5 (FrozenError)", | "\tfrom -:20:in `<main>'"]>. Finished tests in 3.042000s, 143.3268 tests/s, 333.3333 assertions/s. 436 tests, 1014 assertions, 1 failures, 0 errors, 0 skips ``` With patch: ``` Finished tests in 2.620800s, 166.3614 tests/s, 386.9048 assertions/s. 436 tests, 1014 assertions, 0 failures, 0 errors, 0 skips ruby -v: ruby 2.5.0dev (2017-12-17 trunk 61304) [x64-mingw32] ``` ---Files-------------------------------- frozen_cgi.patch (740 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>