@@ -2026,13 +2026,13 @@ public IRubyObject checkArrayType(){
20262026 @ JRubyMethod (name = "==" , required = 1 )
20272027 @ Override
20282028 public IRubyObject op_equal (ThreadContext context , IRubyObject obj ) {
2029- if (this == obj ) return context .runtime . getTrue () ;
2029+ if (this == obj ) return context .tru ;
20302030
20312031 if (!(obj instanceof RubyArray )) {
2032- if (obj == context .nil ) return context .runtime . getFalse () ;
2032+ if (obj == context .nil ) return context .fals ;
20332033
20342034 if (!sites (context ).respond_to_to_ary .respondsTo (context , obj , obj )) {
2035- return context .runtime . getFalse () ;
2035+ return context .fals ;
20362036 }
20372037 return Helpers .rbEqual (context , obj , this );
20382038 }
@@ -2041,25 +2041,25 @@ public IRubyObject op_equal(ThreadContext context, IRubyObject obj) {
20412041
20422042 public RubyBoolean compare (ThreadContext context , CallSite site , IRubyObject other ) {
20432043 if (!(other instanceof RubyArray )) {
2044- if (!sites (context ).respond_to_to_ary .respondsTo (context , other , other )) return context .runtime . getFalse () ;
2044+ if (!sites (context ).respond_to_to_ary .respondsTo (context , other , other )) return context .fals ;
20452045
20462046 return Helpers .rbEqual (context , other , this );
20472047 }
20482048
20492049 RubyArray ary = (RubyArray ) other ;
20502050
2051- if (realLength != ary .realLength ) return context .runtime . getFalse () ;
2051+ if (realLength != ary .realLength ) return context .fals ;
20522052
20532053 for (int i = 0 ; i < realLength ; i ++) {
20542054 IRubyObject a = elt (i );
20552055 IRubyObject b = ary .elt (i );
20562056
20572057 if (a == b ) continue ; // matching MRI opt. mock frameworks can throw errors if we don't
20582058
2059- if (!site .call (context , a , a , b ).isTrue ()) return context .runtime . getFalse () ;
2059+ if (!site .call (context , a , a , b ).isTrue ()) return context .fals ;
20602060 }
20612061
2062- return context .runtime . getTrue () ;
2062+ return context .tru ;
20632063 }
20642064
20652065 /** rb_ary_eql
@@ -2068,7 +2068,7 @@ public RubyBoolean compare(ThreadContext context, CallSite site, IRubyObject oth
20682068 @ JRubyMethod (name = "eql?" , required = 1 )
20692069 public IRubyObject eql (ThreadContext context , IRubyObject obj ) {
20702070 if (!(obj instanceof RubyArray )) {
2071- return context .runtime . getFalse () ;
2071+ return context .fals ;
20722072 }
20732073 return RecursiveComparator .compare (context , sites (context ).eql , this , obj );
20742074 }
@@ -3321,7 +3321,7 @@ private RubyHash makeHash(ThreadContext context, RubyHash hash, Block block) {
33213321 */
33223322 public IRubyObject uniq_bang (ThreadContext context ) {
33233323 RubyHash hash = makeHash ();
3324- if (realLength == hash .size ()) return context .runtime . getNil () ;
3324+ if (realLength == hash .size ()) return context .nil ;
33253325
33263326 // TODO: (CON) This could be a no-op for packed arrays if size does not change
33273327 unpack ();
@@ -3341,7 +3341,7 @@ public IRubyObject uniq_bang19(ThreadContext context, Block block) {
33413341
33423342 if (!block .isGiven ()) return uniq_bang (context );
33433343 RubyHash hash = makeHash (context , block );
3344- if (realLength == hash .size ()) return context .runtime . getNil () ;
3344+ if (realLength == hash .size ()) return context .nil ;
33453345
33463346 // after evaluating the block, a new modify check is needed
33473347 modifyCheck ();
@@ -3746,7 +3746,7 @@ public IRubyObject cycle(ThreadContext context, IRubyObject arg, Block block) {
37463746 if (!block .isGiven ()) return enumeratorizeWithSize (context , this , "cycle" , new IRubyObject [] {arg }, cycleSizeFn (context ));
37473747
37483748 long times = RubyNumeric .num2long (arg );
3749- if (times <= 0 ) return context .runtime . getNil () ;
3749+ if (times <= 0 ) return context .nil ;
37503750
37513751 return cycleCommon (context , times , block );
37523752 }
@@ -3757,7 +3757,7 @@ private IRubyObject cycleCommon(ThreadContext context, long n, Block block) {
37573757 block .yield (context , eltOk (i ));
37583758 }
37593759 }
3760- return context .runtime . getNil () ;
3760+ return context .nil ;
37613761 }
37623762
37633763 private SizeFn cycleSizeFn (final ThreadContext context ) {
@@ -4380,47 +4380,47 @@ public IRubyObject all_p(ThreadContext context, IRubyObject[] args, Block block)
43804380 if (!block .isGiven ()) return all_pBlockless (context );
43814381
43824382 for (int i = 0 ; i < realLength ; i ++) {
4383- if (!block .yield (context , eltOk (i )).isTrue ()) return context .runtime . getFalse () ;
4383+ if (!block .yield (context , eltOk (i )).isTrue ()) return context .fals ;
43844384 }
43854385
4386- return context .runtime . getTrue () ;
4386+ return context .tru ;
43874387 }
43884388
43894389 private IRubyObject all_pBlockless (ThreadContext context ) {
43904390 for (int i = 0 ; i < realLength ; i ++) {
4391- if (!eltOk (i ).isTrue ()) return context .runtime . getFalse () ;
4391+ if (!eltOk (i ).isTrue ()) return context .fals ;
43924392 }
43934393
4394- return context .runtime . getTrue () ;
4394+ return context .tru ;
43954395 }
43964396
43974397 @ JRubyMethod (name = "any?" , optional = 1 )
43984398 public IRubyObject any_p (ThreadContext context , IRubyObject [] args , Block block ) {
4399- if (isEmpty ()) return context .runtime . getFalse () ;
4399+ if (isEmpty ()) return context .fals ;
44004400 if (!isBuiltin ("each" )) return RubyEnumerable .any_pCommon (context , this , args , block );
44014401 boolean patternGiven = args .length > 0 ;
44024402 if (!block .isGiven () || patternGiven ) return any_pBlockless (context , args );
44034403
44044404 for (int i = 0 ; i < realLength ; i ++) {
4405- if (block .yield (context , eltOk (i )).isTrue ()) return context .runtime . getTrue () ;
4405+ if (block .yield (context , eltOk (i )).isTrue ()) return context .tru ;
44064406 }
44074407
4408- return context .runtime . getFalse () ;
4408+ return context .fals ;
44094409 }
44104410
44114411 private IRubyObject any_pBlockless (ThreadContext context , IRubyObject [] args ) {
44124412 IRubyObject pattern = args .length > 0 ? args [0 ] : null ;
44134413 if (pattern == null ) {
44144414 for (int i = 0 ; i < realLength ; i ++) {
4415- if (eltOk (i ).isTrue ()) return context .runtime . getTrue () ;
4415+ if (eltOk (i ).isTrue ()) return context .tru ;
44164416 }
44174417 } else {
44184418 for (int i = 0 ; i < realLength ; i ++) {
4419- if (pattern .callMethod (context , "===" , eltOk (i )).isTrue ()) return context .runtime . getTrue () ;
4419+ if (pattern .callMethod (context , "===" , eltOk (i )).isTrue ()) return context .tru ;
44204420 }
44214421 }
44224422
4423- return context .runtime . getFalse () ;
4423+ return context .fals ;
44244424 }
44254425
44264426 @ JRubyMethod
0 commit comments