diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-17 16:38:54 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-17 17:24:41 +0100 |
commit | 91f2ad36821cc01d2084dd1690fecc0913fc541d (patch) | |
tree | 435b1902cf8d7ab1dfd4b49a2a2144430d144480 /actionview/lib/action_view | |
parent | 85146f6de0a361b98b77c38c589e5208521571b9 (diff) | |
download | rails-91f2ad36821cc01d2084dd1690fecc0913fc541d.tar.gz rails-91f2ad36821cc01d2084dd1690fecc0913fc541d.tar.bz2 rails-91f2ad36821cc01d2084dd1690fecc0913fc541d.zip |
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 `<main>'
```
Besides `Mime::SET.symbols` returns an Array, so we're closer to that.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/template/types.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |