Implement chain.replace_rule()
Add test for chain.replace_rule()
Merge pull request #116 from loli10K/master

Implement chain.replace_rule()