From ca5e23ed4d8818d81314953aadd422b2cbde63b0 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 25 Feb 2019 13:18:44 -0800 Subject: Templates have one format Templates only have one format. Before this commit, templates would be constructed with a single element array that contained the format. This commit eliminates the single element array and just implements a `format` method. This saves one array allocation per template. --- actionview/test/template/resolver_patterns_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/test/template/resolver_patterns_test.rb') diff --git a/actionview/test/template/resolver_patterns_test.rb b/actionview/test/template/resolver_patterns_test.rb index 1e1a4c5063..38357aa10b 100644 --- a/actionview/test/template/resolver_patterns_test.rb +++ b/actionview/test/template/resolver_patterns_test.rb @@ -19,7 +19,7 @@ class ResolverPatternsTest < ActiveSupport::TestCase assert_equal 1, templates.size, "expected one template" assert_equal "Hello custom patterns!", templates.first.source assert_equal "custom_pattern/path", templates.first.virtual_path - assert_equal [:html], templates.first.formats + assert_equal :html, templates.first.format end def test_should_return_all_templates_when_ambiguous_pattern -- cgit v1.2.3