Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use module prepend #266

Merged
merged 8 commits into from
Oct 2, 2022
Merged

Use module prepend #266

merged 8 commits into from
Oct 2, 2022

Conversation

olbrich
Copy link
Owner

@olbrich olbrich commented May 15, 2022

RubyUnits defines some custom behavior for other classes, which either permit easy conversion into Unit objects or which define custom numeric behavior to allow Numeric objects and Unit objects to interoperate properly. These were previously defined using method aliasing, but there are better ways, like using Module#prepend.

Note: the behavior of Numeric#to_unit changed here to be more consistent with how this method behaves in other classes. This is a breaking change.

RubyUnits defines some custom behavior for other classes, which either permit easy conversion into Unit objects or which define custom numeric behavior to allow Numeric objects and Unit objects to interoperate properly. These were previously defined using method aliasing, but there are better ways, like using Module#prepend.

Note: the behavior of Numeric#to_unit changed here to be more consistent with how this method behaves in other classes. This is a breaking change.
@olbrich olbrich self-assigned this May 15, 2022
@olbrich olbrich added the Major incompatible API changes label May 15, 2022
@olbrich olbrich added this to the v3.0.0 milestone Aug 28, 2022
@olbrich olbrich marked this pull request as ready for review October 1, 2022 16:11
@olbrich olbrich merged commit 3ee71f2 into master Oct 2, 2022
@olbrich olbrich deleted the prepend-modules branch October 2, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major incompatible API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant