Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow subclassing money #544
I can see from the spec previously included that it was desired that subclassing would work, but the implementation was incomplete.
All specs remain green, and it works as expected. New specs have been added to attempt to prevent regression.
Scenario: class SpecialMoney < Money # ... end SpecialMoney.new(val1) + SpecialMoney.new(val2) # => returns Money instead of SpecialMoney, thus losing the # SpecialMoney extensions.