3 ms·
they could just use a different interpreter, i.e disable some monkeypatching.
by jlebrech 9y ago
they could just use a different interpreter, i.e disable some monkeypatching.
- whyever 9y agoThey could just add a test that makes sure trivial comparisons still work.
- sleepychu 9y agoyou mean sandbox the interpreter that the kata runs in? Extract the value and then de-serialise it for an equality check in another instance of the interpreter?
- masklinn 9y agoI'm not sure disabling monkeypatching would suffice, couldn't you then just create your own type equal to everything and return that? I assume assert_equal just does `a == b` internally so `a` could be an AlwaysEqual instance rather than a monkeypatched nil. A more sensible alternative would probably be to serialise the assert_equal parameters and check the results externally. Adding negative tests (using `not a == b` to avoid the same monkeypatching of !=) would also help