class Document
# Most of the class omitted...
def add_authors( *names )
@author += " #{names.join(' ')}"
end
end
doc = Document.new
doc.add_authors('author1', 'author2')
Error msg
`add_authors': undefined method `+' for nil:NilClass (NoMethodError)
from test.rb:9:in `<main>'