Support for #=> operator
trans opened this issue · comments
It would be very cool if the #=>
"operator", which is often used in comment examples, could be automatically translated into .assert ==
.
This is now supported as of v2.3.0. Only thing to keep in my is that operator precedence can be a problem. For example, instead of:
1 + 1 #=> 2
You would have to do:
(1 + 1) #=> 2
To make sure that 1 == 2
is not evaluated before the 1 + 1
.