From d17264d93f4278319e60ee20c4e29dc54be343e4 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 13 Aug 2017 22:14:22 +0900 Subject: [PATCH] Use frozen string literal in root files --- .rubocop.yml | 14 +------------- Gemfile | 2 ++ Rakefile | 2 ++ rails.gemspec | 2 ++ version.rb | 2 ++ 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ac8623638c..88d52c68be 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -83,20 +83,8 @@ Style/FrozenStringLiteralComment: Enabled: true EnforcedStyle: always Include: - - 'activesupport/**/*' - - 'activemodel/**/*' - - 'actioncable/**/*' - - 'activejob/**/*' - - 'activerecord/**/*' - - 'activestorage/**/*' - - 'actionmailer/**/*' - - 'actionview/**/*' - - 'actionpack/**/*' - - 'ci/**/*' - - 'guides/**/*' - - 'tasks/**/*' - - 'tools/**/*' Exclude: + - 'railties/**/*' - 'actionview/test/**/*.builder' - 'actionview/test/**/*.ruby' - 'actionpack/test/**/*.builder' diff --git a/Gemfile b/Gemfile index 5e7d9b5b2e..7fc8aa7552 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } diff --git a/Rakefile b/Rakefile index 1421851900..a67f8fd028 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "net/http" $:.unshift __dir__ diff --git a/rails.gemspec b/rails.gemspec index 31eee025bf..4b57377871 100644 --- a/rails.gemspec +++ b/rails.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + version = File.read(File.expand_path("RAILS_VERSION", __dir__)).strip Gem::Specification.new do |s| diff --git a/version.rb b/version.rb index 7bacf2e0ba..92b5e0392a 100644 --- a/version.rb +++ b/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Rails # Returns the version of the currently loaded Rails as a Gem::Version def self.gem_version