aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorPat Allan <pat@freelancing-gods.com>2017-06-20 19:45:46 +1000
committerPat Allan <pat@freelancing-gods.com>2017-06-20 19:45:46 +1000
commitdd491b24ff28f637b1c8879002adb1acdf20a8ac (patch)
treed240379ea8a92ea60d6eefdd1b94e4187749db54 /actionview/lib/action_view
parentb86e313df53ada181850a057e254052f38014738 (diff)
downloadrails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.tar.gz
rails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.tar.bz2
rails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.zip
Make ActionMailer frozen string literal friendly.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/template.rb4
-rw-r--r--actionview/lib/action_view/template/resolver.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb
index b0e2f1e54e..3a69860630 100644
--- a/actionview/lib/action_view/template.rb
+++ b/actionview/lib/action_view/template.rb
@@ -282,7 +282,7 @@ module ActionView
# Make sure that the resulting String to be eval'd is in the
# encoding of the code
- source = <<-end_src
+ source = <<-end_src.dup
def #{method_name}(local_assigns, output_buffer)
_old_virtual_path, @virtual_path = @virtual_path, #{@virtual_path.inspect};_old_output_buffer = @output_buffer;#{locals_code};#{code}
ensure
@@ -334,7 +334,7 @@ module ActionView
def method_name
@method_name ||= begin
- m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}"
+ m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}".dup
m.tr!("-".freeze, "_".freeze)
m
end
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb
index 75ea4d31f5..65f8be26a0 100644
--- a/actionview/lib/action_view/template/resolver.rb
+++ b/actionview/lib/action_view/template/resolver.rb
@@ -14,7 +14,7 @@ module ActionView
alias_method :partial?, :partial
def self.build(name, prefix, partial)
- virtual = ""
+ virtual = "".dup
virtual << "#{prefix}/" unless prefix.empty?
virtual << (partial ? "_#{name}" : name)
new name, prefix, partial, virtual