lib/lazydoc.rb in lazydoc-0.3.0 vs lib/lazydoc.rb in lazydoc-0.3.1

- old
+ new

@@ -22,17 +22,14 @@ def register_file(source_file, default_const_name=nil) source_file = File.expand_path(source_file.to_s) lazydoc = registry.find {|doc| doc.source_file == source_file } unless lazydoc - lazydoc = Document.new(source_file, default_const_name) + lazydoc = Document.new(source_file) registry << lazydoc end - if lazydoc.default_const_name != default_const_name - raise ArgumentError, "inconsistent default_const_name specified for #{source_file}: #{lazydoc.default_const_name.inspect} != #{default_const_name.inspect}" - end - + lazydoc.default_const_name = default_const_name lazydoc end # Registers the line number to the document for source_file and # returns the corresponding comment. \ No newline at end of file