Assertion against nil arguments in Page constructor - one guy sent me a storage, containing a page with nil name

This commit is contained in:
Alexey Verkhovsky 2005-05-05 12:24:02 +00:00
parent e48c348e7f
commit f77cf37f8e

View file

@ -11,6 +11,8 @@ class Page
attr_accessor :revisions
def initialize(web, name, content, created_at, author)
raise 'nil web' if web.nil?
raise 'nil name' if name.nil?
@web, @name, @revisions = web, name, []
revise(content, created_at, author)
end