From bb295be314e7c6d2c26b370209e29eba4b4553c8 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 17 Jan 2016 15:31:09 +0100 Subject: Replace delegate calls with standard method defs. Spares a to_sym call by aliasing to_sym to ref. Then the delegate felt meager for one method; ditch and define method ourselves. --- actionview/lib/action_view/template/types.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionview/lib/action_view/template/types.rb') diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 2bd8bcee02..8ba5a48aef 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -28,12 +28,15 @@ module ActionView @symbol = symbol.to_sym end - delegate :to_s, :to_sym, :to => :symbol + def to_s + @symbol.to_s + end alias to_str to_s def ref @symbol end + alias to_sym ref def ==(type) @symbol == type.to_sym unless type.blank? -- cgit v1.2.3