This allows users to manually add these methods to proxy objects that do not have them. Closes #114.
This is a patch for the following issue: #92 It is possible to have duck typing for numerical operations, but the minus sign is often used for other operations as well such as the set difference that Array#- performs. In that case, even if it does not fail on the :- method, it will probably fail on the subsequent :abs and :<= calls.
This is needed because we've decided not to support operator matchers off of `expect(value).to`, and `match_array` is the best name we've come up with for it.
* Fix build on JRuby. Our sandboxing via forking didn't work on JRuby since fork isn't available. On JRuby we just re-enable all syntaxes at the end of each sandboxed example. * Testing this revealed that the way I was restoring a disabled syntax didn't always work. Based on the random order, sometimes spec/rspec/matchers/be_spec.rb:427 would fail with "TypeError: bind argument must be an instance of Kernel". * Refactored main logic into new syntax module, that can add the syntaxes to any class or module. Kernel/RSpec::Matcher defaults are provided for convenience. This also fixes the bind failure, by redefining the methods anew rather than re-binding the old ones.