OpenDream
OpenDream copied to clipboard
Adds operator~= and proper json_encode()ing for /matrix
Summary
Here, operator~= was implemented by rewriting things a little so that equivalence is handled within MetaObjects rather than relying on snowflake behaviour hard-wired into the operator itself. This should allow for easier support for operator overriding whenever we get that implemented.
I also went ahead and added correct json_encode()ing for /matrix.
Adding this new operator means I could also toss out a weird helper proc lying in our test suite, since this operator acts equivalently (heh) to it.
Changelog
- Added support for the ~= operator for
/matrixs. - Using ~= instead of == on values that lack any special behaviour for that operator no longer causes an unimplemented exception.
- Fixed json_encode() not encoding /matrix values correctly.
- Added more unit testing for ~= and ~! operators.
- Modified the unit tests for /matrix so it uses ~= instead of a weird helper function hidden in the test suite.