Releases: evolve75/RubyTree
Releases · evolve75/RubyTree
Release 0.9.6
This release is identical to R0.9.5, except for the fix to the Gem release date.
Release 0.9.5
This is a feature and bug-fix release.
- Added new methods for getting the path of a node as a string. These have been added as a new mix-in as
Tree::Utils::TreePathHandler
. Thanks to @MZic. - Fixed issue #32 and enabled move semantics on the
Tree::TreeNode#add
method, so that a child being
added, that has an existing parent, will be removed from its old parent, prior to being added to the new location. - Added performance improvements to
Tree::TreeNode#is_root?
andTree::Utils::TreeMetricsHandler#node_depth
. Thanks to @aidansteele. - Added
Tree::TreeNode#rename
andTree::TreeNode#rename_child
methods by merging in code from pull request #35. Thanks to @packetmonkey. - Fixed issue #13 with the patch provided by @jhamon.
- Fixed a bug in
Tree::TreeNode#print_tree
with the patch provided by @packetmonkey. - Fixed issue #31, which was causing incorrect behavior in
Tree::TreeNode#postordered_each
and
Tree::TreeNode#breadth_each
methods when a block was not provided.
Release 0.9.2
This is a feature and bug-fix release.
The Features
- Rubytree now supports postordered traversal via the Tree::TreeNode#postordered_each` method. Thanks to Paul de Courcel for this.
- The Binary tree now supports inorder traversal via the
Tree::BinaryTreeNode#inordered_each
method. - Ability to merge in another tree at a chosen node, or merge two trees to create a third tree. Thanks to Darren Oakley for this (pull #2)
- RubyTree now mixes in the Comparable module.
The Fixes
- (Partial) fix for preventing cyclic graphs in the tree
- Refactored the
Tree::TreeNode#each
method to prevent stack errors while navigating deep trees (issue #12) - Check to ensure that the added node's name is unique to the destination tree (pull #9). Thanks to Youssef Rebahi-Gilbert for the idea and the initial code
- Fix for (issue #23), where the tree traversal on a binary tree would fail if the left child was
nil
. - The traversal methods
Tree::TreeNode#each
,Tree::TreeNode#preordered_each
,Tree::TreeNode#postordered_each
andTree::TreeNode#breadth_each
now correctly return an Enumerator as the return value when no block is given, and return the receiver node if a block was provided. This is consistent with how the standard Ruby collections work.
Other Changes
- Structural changes in the code to refactor out the non-core functions into modules (mostly by extracting out non-core code as mixins).
- Significant refactoring of the documentation. The Yardoc tags are now extensively used.
- Basic support built-in for including example code in the Gem. This will be fully expanded in the next release.
- Various changes to the bundler, travis-ci and other
Rakefile
related changes.