jruby/jruby — pull request #2170 by cheald (2014-11-11 08:00:50+00:00)
Title: test_object fixes

This is a whole bunch of feature/test fixups spawned from un-excluding the test_object tests. 18 tests have been un-excluded!

* ec23759 - A number of objects that should not clone frozen original objects now enforce the frozen check.
* 2264090 - Freeze numerics, booleans, and nil, per MRI behavior
* d5266a1 - True and Nil had their object IDs updated in MRI, from 2/4 to 20/8 respectively. This commit achieves parity with those changes.
* 146b167 - MRI warns when undefining or removing certain methods. Now, JRuby goes as well!
* 407f214 - Previously, MRI would permit "@" as a name. It now expects at least 1 name character.
* 6cd23e0 - Prevents users from `undef`ing `method_missing` (which could undefine the default MM). Instead, if a user attempts to undefine MM, it is removed instead, and errors due to a missing MM are caught. This is the same as MRI behavior now.
* 307f7e5 - MRI mad remove_instance_variable public. Feature parity change.
* dc25cfe - Previously, JRuby would create a new Method instance for each `method_missing`-wrapped method, and comparing them would fail. This change makes comparisons for Methods which wrap the same MM-delegated method succeed.
* e9fb254 - MRI now checks the arity of user-supplied `respond_to?` handlers. Additionally, JRuby now passes `true` as the second parameter to `respond_to?` when it is arity 2.
* 2e597c1 - As it says on the commit
* 7ff0a1f - MRI allows for modification of frozen singletons, ie `def nil.foo; end`, even when `nil.frozen? => true`. This change moves the frozen check into individual `getSingletonClass()` implementations, so that singleton classes can be modified.
* dad0ca5 - MRI changed Object#inspect so that it doesn't delegate to `to_s` anymore. Feature parity.