Feel free to patch monkeys to your heart's content, because as of Ruby 2.0 it can be done in a safe manner. Refinements are a way to implement monkeypatches in a sort of module that can be activated in scopes where the behavior is intended, but leaves all other scopes unchanged. Monkeypatching has always been a risky prospect, controversial and, to some, considered a hack or too risky to do. But with this new feature, it's a perfectly sane and reasonable thing to do.
Comments
No comments yet. Leave a Comment
