diff options
author | Rémy Coutable <remy@rymai.me> | 2018-10-01 14:50:01 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-10-01 14:50:01 +0300 |
commit | 39d2f186a7cceb75ee0b18a9bb21447efb5d4262 (patch) | |
tree | 2abbe56105bd25787dbe0ada6d99bf96ad137015 | |
parent | f8e8374b31eda7ccbe7358a9aa7540d3e914c997 (diff) | |
parent | f6c02ee0275fca7974d8573b855bc40e94bdedcc (diff) |
Merge branch 'frozen-string-docs' into 'master'
Update docs regarding frozen string
See merge request gitlab-org/gitlab-ce!22003
-rw-r--r-- | changelogs/unreleased/frozen-string-docs.yml | 5 | ||||
-rw-r--r-- | doc/development/performance.md | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/changelogs/unreleased/frozen-string-docs.yml b/changelogs/unreleased/frozen-string-docs.yml new file mode 100644 index 00000000000..2eb8a446ee8 --- /dev/null +++ b/changelogs/unreleased/frozen-string-docs.yml @@ -0,0 +1,5 @@ +--- +title: Update docs regarding frozen string +merge_request: +author: gfyoung +type: other diff --git a/doc/development/performance.md b/doc/development/performance.md index 05caffb150a..c7b10dfd5ce 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -364,8 +364,7 @@ Depending on the size of the String and how frequently it would be allocated there's no guarantee it will. Strings will be frozen by default in Ruby 3.0. To prepare our code base for -this eventuality, it's a good practice to add the following header to all -Ruby files: +this eventuality, we will be adding the following header to all Ruby files: ```ruby # frozen_string_literal: true @@ -379,6 +378,9 @@ test = +"hello" test += " world" ``` +When adding new Ruby files, please check that you can add the above header, +as omitting it may lead to style check failures. + ## Anti-Patterns This is a collection of [anti-patterns][anti-pattern] that should be avoided |