Ticket #84 (closed defect: fixed)
Document#write indent documentation confusing
| Reported by: | Phrogz | Owned by: | ser |
|---|---|---|---|
| Priority: | high | Milestone: | 3.1.7 |
| Component: | Other | Version: | 3.1.4 |
| Severity: | minor | Keywords: | write, indent, hierarchy, hierarchical, indented |
| Cc: | gavin.kistner@… | Ruby version: | Other |
| Operating system: | Windows |
Description
Indentation produced by Document#write seems inconsistent with the documentation.
The docs say: "indent: An integer. If -1, no indenting will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount."
I read that to mean: "For a value of 1, each nested child will be indented by 1 more space than its parent. For a value of 3, each nested child will be indented by 3 more spaces than its parent."
Instead, it seems to mean: "Every level of indentation is always 2 spaces inset. For a value of 3, every item will be indented 3 more levels, 6 more spaces (2 * 3)."
This is with Ruby 1.8.5, REXML Version 3.1.4 (both options are missing from the Trac pulldowns).
