From 0e13941dbe9c4840175e5c6f5b2c3f572249a4ec Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 25 Feb 2019 16:42:45 -0800 Subject: `original_encoding` isn't used, so deprecate it and remove the ivar --- actionview/lib/action_view/file_template.rb | 4 ++-- actionview/lib/action_view/template.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actionview') diff --git a/actionview/lib/action_view/file_template.rb b/actionview/lib/action_view/file_template.rb index cdc077a01a..dea02176eb 100644 --- a/actionview/lib/action_view/file_template.rb +++ b/actionview/lib/action_view/file_template.rb @@ -22,11 +22,11 @@ module ActionView # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. def marshal_dump # :nodoc: - [ @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @format, @variant ] + [ @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant ] end def marshal_load(array) # :nodoc: - @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @format, @variant = *array + @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant = *array @compile_mutex = Mutex.new end end diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 06d3de17b3..7f29dedd7c 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -140,7 +140,6 @@ module ActionView @identifier = identifier @handler = handler @compiled = false - @original_encoding = nil @locals = locals @virtual_path = virtual_path @@ -156,6 +155,7 @@ module ActionView @compile_mutex = Mutex.new end + deprecate :original_encoding deprecate def virtual_path=(_); end deprecate def locals=(_); end deprecate def formats=(_); end @@ -266,11 +266,11 @@ module ActionView # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. def marshal_dump # :nodoc: - [ @source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @format, @variant ] + [ @source, @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant ] end def marshal_load(array) # :nodoc: - @source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @format, @variant = *array + @source, @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant = *array @compile_mutex = Mutex.new end -- cgit v1.2.3