Ruby generally doesn't allow mixing of types without explicit conversion. So have you ever wondered why it's possible to multiply 2.3 (a float) by 5 (an integer)? In today's episode we'll discover how Ruby's implicit coercions work, and how to apply them to our own custom numeric-like classes.
This page is just for members. Sign in or subscribe to gain access!