|
|
|
with the patch combined and eql/==/=== fixes half of the test_settracefunc.rb tests pass:
1) Failure: the new patch doesn't contain other equality fixes yet: missing Method: Proc#== maybe the failed test relies on Method comparison (but guessing now) attached new patch (not final one) and current JRuby/MRI api diff there's more work left for tomorrow though, any further thoughts ?. Additional fixes on top of my earlier ones and Marcin's, that allows test_settracefunc to run to completion. However the changes are a big questionable, and they prevent ant test from running successfully. The additional changes were:
Since the patch breaks ant test, it still needs work. All these changes except the stuff inside RubyKernel#raise seem mostly reasonable...though they have some small potential to add a bit of overhead. The backtrace/set_backtrace stuff needs a better explanation...my hacked way of making it pass is not sufficient. This has been reported again and should be fixed for 1.1. More information is coming.
Er, sorry, to be more specific, the missing == methods above must be fixed.
Tests asserting the correct behaviour of Method#==, UnboundMethod#==, and Proc#==.
Note three tests are marked as failing under Ruby 1.8.5, in spite of documentation stating that they should pass. Whoops, didn't realize my file description would be attached as a comment.
I've added method_equality_test.rb to define the expected behaviour of the missing == methods. I hit the issue when switching a Rails project from Ruby 1.8.5 to JRuby 1.0.1. There is no way to implement these in user code as the internals of all three classes are hidden in both implementations. Also, I found it frustrating in Ruby that == is defined on these three classes in terms of having the same body (which is preserved under method aliasing), and yet eql? and hash are not defined in a similar way so none of them can be used effectively as Hash keys, which is my target usage. I am currently working around this in Ruby by defining UnboundMethod#=hash to be a fixed number, which works but means my Hashes degenerate to associative lists. I will log this as a feature request on the appropriate Ruby issue tracker, but I just wanted to mention it here for interest's sake. Invalid, these tests no longer exist and have been replaced by others.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JRUBY-971, which is the cause of the failure it gets to now (basically, the default === impl needs to always invoke ==, and Fixnum needs to map to the right methods).