@@ -4,7 +4,7 @@ def all?(&block)
4
4
var result = true;
5
5
6
6
if (block !== nil) {
7
- self.$each._p = function() {
7
+ self.$each.$$p = function() {
8
8
var value = $opal.$yieldX(block, arguments);
9
9
10
10
if (value === $breaker) {
@@ -19,7 +19,7 @@ def all?(&block)
19
19
}
20
20
}
21
21
else {
22
- self.$each._p = function(obj) {
22
+ self.$each.$$p = function(obj) {
23
23
if (arguments.length == 1 && #{ Opal . falsy? ( `obj` ) } ) {
24
24
result = false;
25
25
return $breaker;
@@ -38,7 +38,7 @@ def any?(&block)
38
38
var result = false;
39
39
40
40
if (block !== nil) {
41
- self.$each._p = function() {
41
+ self.$each.$$p = function() {
42
42
var value = $opal.$yieldX(block, arguments);
43
43
44
44
if (value === $breaker) {
@@ -53,7 +53,7 @@ def any?(&block)
53
53
};
54
54
}
55
55
else {
56
- self.$each._p = function(obj) {
56
+ self.$each.$$p = function(obj) {
57
57
if (arguments.length != 1 || #{ Opal . truthy? ( `obj` ) } ) {
58
58
result = true;
59
59
return $breaker;
@@ -77,7 +77,7 @@ def collect(&block)
77
77
%x{
78
78
var result = [];
79
79
80
- self.$each._p = function() {
80
+ self.$each.$$p = function() {
81
81
var value = $opal.$yieldX(block, arguments);
82
82
83
83
if (value === $breaker) {
@@ -112,7 +112,7 @@ def count(object = undefined, &block)
112
112
block = function() { return true; };
113
113
}
114
114
115
- self.$each._p = function() {
115
+ self.$each.$$p = function() {
116
116
var value = $opal.$yieldX(block, arguments);
117
117
118
118
if (value === $breaker) {
@@ -144,7 +144,7 @@ def cycle(n = nil, &block)
144
144
var result,
145
145
all = [];
146
146
147
- self.$each._p = function() {
147
+ self.$each.$$p = function() {
148
148
var param = #{ Opal . destructure ( `arguments` ) } ,
149
149
value = $opal.$yield1(block, param);
150
150
@@ -202,7 +202,7 @@ def detect(ifnone = undefined, &block)
202
202
%x{
203
203
var result = undefined;
204
204
205
- self.$each._p = function() {
205
+ self.$each.$$p = function() {
206
206
var params = #{ Opal . destructure ( `arguments` ) } ,
207
207
value = $opal.$yield1(block, params);
208
208
@@ -243,7 +243,7 @@ def drop(number)
243
243
var result = [],
244
244
current = 0;
245
245
246
- self.$each._p = function() {
246
+ self.$each.$$p = function() {
247
247
if (number <= current) {
248
248
result.push(#{ Opal . destructure ( `arguments` ) } );
249
249
}
@@ -264,7 +264,7 @@ def drop_while(&block)
264
264
var result = [],
265
265
dropping = true;
266
266
267
- self.$each._p = function() {
267
+ self.$each.$$p = function() {
268
268
var param = #{ Opal . destructure ( `arguments` ) } ;
269
269
270
270
if (dropping) {
@@ -312,7 +312,7 @@ def each_slice(n, &block)
312
312
var result,
313
313
slice = []
314
314
315
- self.$each._p = function() {
315
+ self.$each.$$p = function() {
316
316
var param = #{ Opal . destructure ( `arguments` ) } ;
317
317
318
318
slice.push(param);
@@ -351,7 +351,7 @@ def each_with_index(*args, &block)
351
351
var result,
352
352
index = 0;
353
353
354
- self.$each._p = function() {
354
+ self.$each.$$p = function() {
355
355
var param = #{ Opal . destructure ( `arguments` ) } ,
356
356
value = block(param, index);
357
357
@@ -379,7 +379,7 @@ def each_with_object(object, &block)
379
379
%x{
380
380
var result;
381
381
382
- self.$each._p = function() {
382
+ self.$each.$$p = function() {
383
383
var param = #{ Opal . destructure ( `arguments` ) } ,
384
384
value = block(param, object);
385
385
@@ -403,7 +403,7 @@ def entries(*args)
403
403
%x{
404
404
var result = [];
405
405
406
- self.$each._p = function() {
406
+ self.$each.$$p = function() {
407
407
result.push(#{ Opal . destructure ( `arguments` ) } );
408
408
};
409
409
@@ -421,7 +421,7 @@ def find_all(&block)
421
421
%x{
422
422
var result = [];
423
423
424
- self.$each._p = function() {
424
+ self.$each.$$p = function() {
425
425
var param = #{ Opal . destructure ( `arguments` ) } ,
426
426
value = $opal.$yield1(block, param);
427
427
@@ -449,7 +449,7 @@ def find_index(object = undefined, &block)
449
449
index = 0;
450
450
451
451
if (object != null) {
452
- self.$each._p = function() {
452
+ self.$each.$$p = function() {
453
453
var param = #{ Opal . destructure ( `arguments` ) } ;
454
454
455
455
if (#{ `param` == `object` } ) {
@@ -461,7 +461,7 @@ def find_index(object = undefined, &block)
461
461
};
462
462
}
463
463
else if (block !== nil) {
464
- self.$each._p = function() {
464
+ self.$each.$$p = function() {
465
465
var value = $opal.$yieldX(block, arguments);
466
466
467
467
if (value === $breaker) {
@@ -489,7 +489,7 @@ def first(number = undefined)
489
489
result = nil
490
490
491
491
%x{
492
- self.$each._p = function() {
492
+ self.$each.$$p = function() {
493
493
result = #{ Opal . destructure ( `arguments` ) } ;
494
494
495
495
return $breaker;
@@ -513,7 +513,7 @@ def first(number = undefined)
513
513
var current = 0,
514
514
number = #{ Opal . coerce_to number , Integer , :to_int } ;
515
515
516
- self.$each._p = function() {
516
+ self.$each.$$p = function() {
517
517
result.push(#{ Opal . destructure ( `arguments` ) } );
518
518
519
519
if (number <= ++current) {
@@ -535,7 +535,7 @@ def grep(pattern, &block)
535
535
var result = [];
536
536
537
537
if (block !== nil) {
538
- self.$each._p = function() {
538
+ self.$each.$$p = function() {
539
539
var param = #{ Opal . destructure ( `arguments` ) } ,
540
540
value = #{ pattern === `param` } ;
541
541
@@ -552,7 +552,7 @@ def grep(pattern, &block)
552
552
};
553
553
}
554
554
else {
555
- self.$each._p = function() {
555
+ self.$each.$$p = function() {
556
556
var param = #{ Opal . destructure ( `arguments` ) } ,
557
557
value = #{ pattern === `param` } ;
558
558
@@ -576,7 +576,7 @@ def group_by(&block)
576
576
%x{
577
577
var result;
578
578
579
- self.$each._p = function() {
579
+ self.$each.$$p = function() {
580
580
var param = #{ Opal . destructure ( `arguments` ) } ,
581
581
value = $opal.$yield1(block, param);
582
582
@@ -602,7 +602,7 @@ def include?(obj)
602
602
%x{
603
603
var result = false;
604
604
605
- self.$each._p = function() {
605
+ self.$each.$$p = function() {
606
606
var param = #{ Opal . destructure ( `arguments` ) } ;
607
607
608
608
if (#{ `param` == obj } ) {
@@ -622,7 +622,7 @@ def inject(object = undefined, sym = undefined, &block)
622
622
var result = object;
623
623
624
624
if (block !== nil && sym === undefined) {
625
- self.$each._p = function() {
625
+ self.$each.$$p = function() {
626
626
var value = #{ Opal . destructure ( `arguments` ) } ;
627
627
628
628
if (result === undefined) {
@@ -650,7 +650,7 @@ def inject(object = undefined, sym = undefined, &block)
650
650
result = undefined;
651
651
}
652
652
653
- self.$each._p = function() {
653
+ self.$each.$$p = function() {
654
654
var value = #{ Opal . destructure ( `arguments` ) } ;
655
655
656
656
if (result === undefined) {
@@ -686,7 +686,7 @@ def max(&block)
686
686
var result;
687
687
688
688
if (block !== nil) {
689
- self.$each._p = function() {
689
+ self.$each.$$p = function() {
690
690
var param = #{ Opal . destructure ( `arguments` ) } ;
691
691
692
692
if (result === undefined) {
@@ -711,7 +711,7 @@ def max(&block)
711
711
};
712
712
}
713
713
else {
714
- self.$each._p = function() {
714
+ self.$each.$$p = function() {
715
715
var param = #{ Opal . destructure ( `arguments` ) } ;
716
716
717
717
if (result === undefined) {
@@ -738,7 +738,7 @@ def max_by(&block)
738
738
var result,
739
739
by;
740
740
741
- self.$each._p = function() {
741
+ self.$each.$$p = function() {
742
742
var param = #{ Opal . destructure ( `arguments` ) } ,
743
743
value = $opal.$yield1(block, param);
744
744
@@ -772,7 +772,7 @@ def min(&block)
772
772
var result;
773
773
774
774
if (block !== nil) {
775
- self.$each._p = function() {
775
+ self.$each.$$p = function() {
776
776
var param = #{ Opal . destructure ( `arguments` ) } ;
777
777
778
778
if (result === undefined) {
@@ -797,7 +797,7 @@ def min(&block)
797
797
};
798
798
}
799
799
else {
800
- self.$each._p = function() {
800
+ self.$each.$$p = function() {
801
801
var param = #{ Opal . destructure ( `arguments` ) } ;
802
802
803
803
if (result === undefined) {
@@ -824,7 +824,7 @@ def min_by(&block)
824
824
var result,
825
825
by;
826
826
827
- self.$each._p = function() {
827
+ self.$each.$$p = function() {
828
828
var param = #{ Opal . destructure ( `arguments` ) } ,
829
829
value = $opal.$yield1(block, param);
830
830
@@ -864,7 +864,7 @@ def none?(&block)
864
864
var result = true;
865
865
866
866
if (block !== nil) {
867
- self.$each._p = function() {
867
+ self.$each.$$p = function() {
868
868
var value = $opal.$yieldX(block, arguments);
869
869
870
870
if (value === $breaker) {
@@ -879,7 +879,7 @@ def none?(&block)
879
879
}
880
880
}
881
881
else {
882
- self.$each._p = function() {
882
+ self.$each.$$p = function() {
883
883
var value = #{ Opal . destructure ( `arguments` ) } ;
884
884
885
885
if (#{ Opal . truthy? ( `value` ) } ) {
@@ -900,7 +900,7 @@ def one?(&block)
900
900
var result = false;
901
901
902
902
if (block !== nil) {
903
- self.$each._p = function() {
903
+ self.$each.$$p = function() {
904
904
var value = $opal.$yieldX(block, arguments);
905
905
906
906
if (value === $breaker) {
@@ -919,7 +919,7 @@ def one?(&block)
919
919
}
920
920
}
921
921
else {
922
- self.$each._p = function() {
922
+ self.$each.$$p = function() {
923
923
var value = #{ Opal . destructure ( `arguments` ) } ;
924
924
925
925
if (#{ Opal . truthy? ( `value` ) } ) {
@@ -945,7 +945,7 @@ def partition(&block)
945
945
%x{
946
946
var truthy = [], falsy = [];
947
947
948
- self.$each._p = function() {
948
+ self.$each.$$p = function() {
949
949
var param = #{ Opal . destructure ( `arguments` ) } ,
950
950
value = $opal.$yield1(block, param);
951
951
@@ -976,7 +976,7 @@ def reject(&block)
976
976
%x{
977
977
var result = [];
978
978
979
- self.$each._p = function() {
979
+ self.$each.$$p = function() {
980
980
var param = #{ Opal . destructure ( `arguments` ) } ,
981
981
value = $opal.$yield1(block, param);
982
982
@@ -1002,7 +1002,7 @@ def reverse_each(&block)
1002
1002
%x{
1003
1003
var result = [];
1004
1004
1005
- self.$each._p = function() {
1005
+ self.$each.$$p = function() {
1006
1006
result.push(arguments);
1007
1007
};
1008
1008
@@ -1029,7 +1029,7 @@ def slice_before(pattern = undefined, &block)
1029
1029
1030
1030
if (block !== nil) {
1031
1031
if (pattern === undefined) {
1032
- self.$each._p = function() {
1032
+ self.$each.$$p = function() {
1033
1033
var param = #{ Opal . destructure ( `arguments` ) } ,
1034
1034
value = $opal.$yield1(block, param);
1035
1035
@@ -1042,7 +1042,7 @@ def slice_before(pattern = undefined, &block)
1042
1042
};
1043
1043
}
1044
1044
else {
1045
- self.$each._p = function() {
1045
+ self.$each.$$p = function() {
1046
1046
var param = #{ Opal . destructure ( `arguments` ) } ,
1047
1047
value = block(param, #{ pattern . dup } );
1048
1048
@@ -1056,7 +1056,7 @@ def slice_before(pattern = undefined, &block)
1056
1056
}
1057
1057
}
1058
1058
else {
1059
- self.$each._p = function() {
1059
+ self.$each.$$p = function() {
1060
1060
var param = #{ Opal . destructure ( `arguments` ) } ,
1061
1061
value = #{ pattern === `param` } ;
1062
1062
@@ -1102,7 +1102,7 @@ def take_while(&block)
1102
1102
%x{
1103
1103
var result = [];
1104
1104
1105
- self.$each._p = function() {
1105
+ self.$each.$$p = function() {
1106
1106
var param = #{ Opal . destructure ( `arguments` ) } ,
1107
1107
value = $opal.$yield1(block, param);
1108
1108
0 commit comments