From 91f2ad36821cc01d2084dd1690fecc0913fc541d Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 17 Jan 2016 16:38:54 +0100 Subject: Store the symbols as an array. A Set can't be implicitly converted into an Array: ``` irb(main):012:0> formats = [ :rss ] => [:rss] irb(main):013:0> formats &= SET.symbols TypeError: no implicit conversion of Set into Array from (irb):13:in `&' from (irb):13 from /Users/kasperhansen/.rbenv/versions/2.2.3/bin/irb:11:in `
' ``` Besides `Mime::SET.symbols` returns an Array, so we're closer to that. --- actionview/lib/action_view/template/types.rb | 2 +- 1 file changed, 1 insertion(+), 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 f423399c30..ddc5b25831 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -5,7 +5,7 @@ module ActionView class Template class Types class Type - SET = Struct.new(:symbols).new(Set.new([ :html, :text, :js, :css, :xml, :json ])) + SET = Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ]) def self.[](type) if type.is_a?(self) -- cgit v1.2.3