Buggy code:
@ Specialization ( contains = "getIntegerFixnumInBounds" , guards = "isIntegerFixnum" ) public Object getIntegerFixnum ( RubyArray array , int index ) { } @ Specialization ( guards = "isLongFixnum" , rewriteOn = UnexpectedResultException . class ) public long getLongFixnumInBounds ( RubyArray array , int index ) throws UnexpectedResultException { } @ Specialization ( contains = "getLongFixnumInBounds" , guards = "isLongFixnum" ) public Object getLongFixnum ( RubyArray array , int index ) { } @ Specialization ( guards = "isFloat" , rewriteOn = UnexpectedResultException . class ) public double getFloatInBounds ( RubyArray array , int index ) throws UnexpectedResultException { } @ Specialization ( contains = "getFloatInBounds" , guards = "isFloat" ) public Object getFloat ( RubyArray array , int index ) { } @ Specialization ( guards = "isObject" ) public Object getObject ( RubyArray array , int index ) { } } @ CoreMethod ( names = { "[]" , "slice" } , required = 1 , optional = 1 , lowerFixnumParameters = { 0 , 1 } ) public static abstract class IndexNode extends ArrayCoreMethodNode { @ Child protected ArrayNodes . AtNode atNode ; private final BranchProfile outOfBounds = BranchProfile . create ( ) ; public IndexNode ( RubyContext context , SourceSection sourceSection ) { } public IndexNode ( ArrayNodes . IndexNode prev ) { } @ Specialization public Object index ( RubyArray array , int index , UndefinedPlaceholder undefined ) { } @ Specialization ( guards = "isIntegerFixnum" ) public Object sliceIntegerFixnum ( RubyArray array , int start , int length ) { } @ Specialization ( guards = "isLongFixnum" ) public Object sliceLongFixnum ( RubyArray array , int start , int length ) { } @ Specialization ( guards = "isFloat" ) public Object sliceFloat ( RubyArray array , int start , int length ) { } @ Specialization ( guards = "isObject" ) public Object sliceObject ( RubyArray array , int start , int length ) { } @ Specialization ( guards = "isObject" ) public Object sliceObject ( RubyArray array , RubyRange . IntegerFixnumRange range , UndefinedPlaceholder undefined ) { } } @ CoreMethod ( names = "[]=" , required = 2 , optional = 1 , lowerFixnumParameters = 0 ) public static abstract class IndexSetNode extends ArrayCoreMethodNode { private final BranchProfile tooSmallBranch = BranchProfile . create ( ) ; private final BranchProfile pastEndBranch = BranchProfile . create ( ) ; private final BranchProfile appendBranch = BranchProfile . create ( ) ; private final BranchProfile beyondBranch = BranchProfile . create ( ) ; private final BranchProfile reallocateBranch = BranchProfile . create ( ) ; public IndexSetNode ( RubyContext context , SourceSection sourceSection ) { } public IndexSetNode ( ArrayNodes . IndexSetNode prev ) { } @ Specialization ( guards = "isNull" ) public Object setNullIntegerFixnum ( RubyArray array , int index , int value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isNull" ) public Object setNullLongFixnum ( RubyArray array , int index , long value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isNull" ) public Object setNullObject ( RubyArray array , int index , Object value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isIntegerFixnum" ) public int setIntegerFixnum ( RubyArray array , int index , int value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isIntegerFixnum" ) public long setLongInIntegerFixnum ( RubyArray array , int index , long value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isIntegerFixnum" ) public RubyArray setIntegerFixnum ( RubyArray array , int start , int length , RubyArray value ) { } @ Specialization ( guards = "isLongFixnum" ) public int setLongFixnum ( RubyArray array , int index , int value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isLongFixnum" ) public long setLongFixnum ( RubyArray array , int index , long value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isFloat" ) public double setFloat ( RubyArray array , int index , double value , UndefinedPlaceholder unused ) { } @ Specialization ( guards = "isObject" ) public Object setObject ( RubyArray array , int index , Object value , UndefinedPlaceholder unused ) { } <START_BUG> @ Specialization ( guards = { "isObject" , "!isRubyArray(arguments[3])" } ) <END_BUG> public Object setObject ( RubyArray array , int start , int length , Object value ) { notDesignedForCompilation ( ) ; if ( length < 0 ) { CompilerDirectives . transferToInterpreter ( ) ; throw new org . jruby . truffle . runtime . control . RaiseException ( getContext ( ) . getCoreLibrary ( ) . indexNegativeLength ( length , this ) ) ; } final int begin = array . normaliseIndex ( start ) ; if ( begin >= ( array . getSize ( ) ) ) { return setObject ( array , start , value , INSTANCE ) ; } else { throw new UnsupportedOperationException ( ) ; } } @ Specialization ( guards = "isIntegerFixnum" ) public RubyArray setIntegerFixnumRange ( RubyArray array , RubyRange . IntegerFixnumRange range , RubyArray other , UndefinedPlaceholder unused ) { } } @ CoreMethod ( names = "any?" , needsBlock = true ) @ ImportGuards ( ArrayGuards . class ) public static abstract class AnyNode extends YieldingCoreMethodNode { public AnyNode ( RubyContext context , SourceSection sourceSection ) { } public AnyNode ( ArrayNodes . AnyNode prev ) { } @ Specialization ( guards = "isNull" ) public boolean anyNull ( VirtualFrame frame , RubyArray array , RubyProc block ) { } @ Specialization ( guards = "isIntegerFixnum" ) public boolean allIntegerFixnum ( VirtualFrame frame , RubyArray array , RubyProc block ) { } @ Specialization ( guards = "isLongFixnum" ) public boolean anyLongFixnum ( VirtualFrame frame , RubyArray array , RubyProc block ) { } @ Specialization ( guards = "isFloat" ) public boolean anyFloat ( VirtualFrame frame , RubyArray array , RubyProc block ) { }

Fix:
@ Specialization ( guards = { "isObject" , "!isRubyArray(arguments[3])" , "!isUndefinedPlaceholder(arguments[3])" } )