discourse/discourse — pull request #94 by danneu (2013-02-09 17:16:39+00:00)
Title: Extracted default value initializers.

[Issue #73 undefined method `each' for nil:NilClass in application.css.erb](https://github.com/discourse/discourse/issues/73) brought to light the aspect that `DiscoursePluginRegistry` class-level accessors are not set to default values until their matching instance methods are called.

So I extracted the initialization.

In other words, where there once was this behavior:

~~~ ruby
DiscoursePluginRegistry.stylesheets = nil
DiscoursePluginRegistry.stylesheets #=> nil
DiscoursePluginRegistry.new.stylesheets
DiscoursePluginRegistry.stylesheets #=> Set.new
~~~

...there is now this behavior which I believe is intended:

~~~ ruby
DiscoursePluginRegistry.stylesheets = nil
DiscoursePluginRegistry.stylesheets #=> Set.new
~~~