From 036bdee4d5bdad3b3fa1d57ca292214afe746a09 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Mon, 19 Jun 2017 19:03:10 +1000 Subject: Make ActiveSupport frozen string literal friendly. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0. --- activesupport/lib/active_support/xml_mini/nokogirisax.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/xml_mini/nokogirisax.rb') diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index 54e15e6a5f..902faac312 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -37,7 +37,7 @@ module ActiveSupport end def start_element(name, attrs = []) - new_hash = { CONTENT_KEY => "" }.merge!(Hash[attrs]) + new_hash = { CONTENT_KEY => "".dup }.merge!(Hash[attrs]) new_hash[HASH_SIZE_KEY] = new_hash.size + 1 case current_hash[name] -- cgit v1.2.3 From cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 22 Jun 2017 22:59:18 -0400 Subject: Enforce frozen string in Rubocop --- activesupport/lib/active_support/xml_mini/nokogirisax.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/xml_mini/nokogirisax.rb') diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index 54e15e6a5f..e754ec08a3 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require "nokogiri" rescue LoadError => e -- cgit v1.2.3 From 87b3e226d65ac1ed371620bfdcd2f950c87cfece Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 2 Jul 2017 02:15:17 +0930 Subject: Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. --- activesupport/lib/active_support/xml_mini/nokogirisax.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activesupport/lib/active_support/xml_mini/nokogirisax.rb') diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index f575e2829c..902faac312 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true begin require "nokogiri" rescue LoadError => e -- cgit v1.2.3