提交 91f2ad36 编写于 作者: K Kasper Timm Hansen

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.
上级 85146f6d
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册