* Thread#backtrace_locations * Kernel#caller_locations * Exception#backtrace_locations (not official, but should be soon)
* Fix each_with_index use in #drop. * Fix subtype preservation in *with_index methods. * Handle all-arrays and all-not-arrays in #zip like MRI. * Handle no-arg zip when given a block. * Properly implement zipping past the end of one or more args.
* Move to Kernel, Enumerable their methods defined in Enumerator. * Reduce some duplication of logic in Enumerator. * Add Enumerable#chunk. * Add a mostly complete implementation of Enumerator::Lazy. * Multiple minor fixes throughout Enumera* to support 2.0 logic.
Instance evals and define_method always force the binding associated with a block to be cloned. This is a large part of the cost of these call paths. This patch reduces allocation to improve the performance of binding cloning. * Make DummyDynamicScope.clone return itself * Preallocate dummy scope on binding when setting up proc * Copy dummy scope reference to new binding, to avoid recreating * Reference an eval binding rather than creating DynamicScope
* Do not clone block if we aren't modifying frame self * Do not create intermediate lists for 1.9 args setup * Use preallocated, frozen Array for intermediate Array of size 0
Logic for checking the bind target of UnboundMethod was overcomplicated and redundant in places, so I refactored it into a separate "check" method. I added a call to that method in the modified define_method logic to ensure the target is valid in the same way.
Before this change, we would rebind the method passed to Module# define_method every invocation. However, since the only requirement for define_method against a method or unbound method is that the rebind would succeed (by having the method in the same hierarchy), rebinding for every object is unnecessary. This optimization removes that rebinding and just transplant the method from the source to the original DynamicMethod. Invocations of the name bound by define_method then perform exactly as the original. This could be more useful if the UnboundMethod could come from any module, since modules can in theory live in any hierarchy. Libraries of utility methods could be assembled via define_method into other classes. I may explore that as a feature to present to the other implementers.
…irectories ending in slash * Ruboto Issue #338 Using and __FILE__
…(3) return to -1, not < 0 for error.