Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Object#try(:squeeze!) raises an array index out of bounds exception #3668
Using Active Support's
To reproduce, with Active Support installed:
require 'active_support' require 'active_support/core_ext' # Works: # ' '.squeeze # ' '.squeeze! # ''.try(:squeeze) # ''.try(:squeeze!) # # Does not work: # ' '.try(:squeeze) # ' '.try(:squeeze!) ' '.try(:squeeze)
I was able reproduce this in JRuby 9.0.x.x and JRuby 1.7.x with Active Support 4.2 back to 3.2. It seems to be limited to the
Let me know if you need any other info.
* master: (28 commits) single Unsafe retrieval is enough - do not do it over again in StringSupport [test] add and pend load module wrapping test - does not work for this case currently make JavaMethod arity sub-classes open-closed with call overrides (for less surprises) Add a simple issue template for contributors. [Truffle] Strip out internal NilNodes when flattening a sequence. [Truffle] Break down IfNode into If, IfElse and Unless so they can be simpler. [Truffle] BreakShellException is dead code. [Truffle] Tidy up NotNode. [Truffle] Tidy up IfNode. [Truffle] Tidy up OrNode. [Truffle] Tidy up AndNode. [Truffle] Couple of minor cosmetic fixes to the backtrace package. [Truffle] Interleaving Java should be configured per-formatter. [Truffle] Remove print_interleaved_backtrace, as we can do it with -Xtruffle.backtraces.interleave_java now. [Truffle] Option to interleave Java stacktraces in Ruby backtraces. [Truffle] Store Java exceptions in some cases. [Truffle] Optionally store Java stack traces in Ruby backtraces. [Truffle] Simplify long-winded comment. [Truffle] Move check_ambiguous_arguments to allowed failures. test that public_send correctly dispatches native Java methods (closing #3668) ...