code-ruby 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/code +8 -5
- data/lib/code/concerns/shared.rb +102 -98
- data/lib/code/format.rb +23 -19
- data/lib/code/network.rb +23 -28
- data/lib/code/node/call.rb +9 -8
- data/lib/code/node/code.rb +1 -1
- data/lib/code/node/list.rb +10 -8
- data/lib/code/node/square_bracket.rb +4 -2
- data/lib/code/object/boolean.rb +13 -17
- data/lib/code/object/class.rb +32 -27
- data/lib/code/object/code.rb +2 -9
- data/lib/code/object/context.rb +4 -2
- data/lib/code/object/cryptography.rb +12 -6
- data/lib/code/object/date.rb +910 -449
- data/lib/code/object/decimal.rb +229 -856
- data/lib/code/object/dictionary.rb +113 -42
- data/lib/code/object/duration.rb +3 -7
- data/lib/code/object/function.rb +64 -40
- data/lib/code/object/global.rb +121 -208
- data/lib/code/object/html.rb +4 -2
- data/lib/code/object/http.rb +32 -26
- data/lib/code/object/ics.rb +2 -1
- data/lib/code/object/identifier_list.rb +16 -11
- data/lib/code/object/integer.rb +270 -942
- data/lib/code/object/json.rb +8 -3
- data/lib/code/object/list.rb +97 -109
- data/lib/code/object/nothing.rb +11 -11
- data/lib/code/object/number.rb +20 -10
- data/lib/code/object/parameter.rb +18 -9
- data/lib/code/object/range.rb +62 -108
- data/lib/code/object/smtp.rb +20 -12
- data/lib/code/object/string.rb +52 -28
- data/lib/code/object/super.rb +2 -1
- data/lib/code/object/time.rb +1146 -572
- data/lib/code/object/url.rb +4 -2
- data/lib/code/object.rb +119 -80
- data/lib/code/parser.rb +34 -32
- metadata +1 -1
data/lib/code/object/integer.rb
CHANGED
|
@@ -5,94 +5,61 @@ class Code
|
|
|
5
5
|
class Integer < Number
|
|
6
6
|
CLASS_DOCUMENTATION = {
|
|
7
7
|
name: "Integer",
|
|
8
|
-
description:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"12.digits",
|
|
12
|
-
"3.times((i) => { i })"
|
|
13
|
-
]
|
|
8
|
+
description:
|
|
9
|
+
"represents whole numbers with arithmetic, bitwise operations, iteration, duration helpers, and numeric predicates.",
|
|
10
|
+
examples: ["Integer.new(1)", "12.digits", "3.times((i) => { i })"]
|
|
14
11
|
}.freeze
|
|
15
12
|
INSTANCE_FUNCTIONS = {
|
|
16
13
|
"%" => {
|
|
17
14
|
name: "%",
|
|
18
15
|
description: "returns the integer modulo another number.",
|
|
19
|
-
examples: [
|
|
20
|
-
"5 % 2",
|
|
21
|
-
"4 % 2",
|
|
22
|
-
"7 % 3"
|
|
23
|
-
]
|
|
16
|
+
examples: ["5 % 2", "4 % 2", "7 % 3"]
|
|
24
17
|
},
|
|
25
18
|
"modulo" => {
|
|
26
19
|
name: "modulo",
|
|
27
20
|
description: "returns the integer modulo another number.",
|
|
28
|
-
examples: [
|
|
29
|
-
"5.modulo(2)",
|
|
30
|
-
"4.modulo(2)",
|
|
31
|
-
"7.modulo(3)"
|
|
32
|
-
]
|
|
21
|
+
examples: %w[5.modulo(2) 4.modulo(2) 7.modulo(3)]
|
|
33
22
|
},
|
|
34
23
|
"&" => {
|
|
35
24
|
name: "&",
|
|
36
|
-
description:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"4 & 1",
|
|
40
|
-
"7 & 2"
|
|
41
|
-
]
|
|
25
|
+
description:
|
|
26
|
+
"returns the bitwise and of the integer and another number.",
|
|
27
|
+
examples: ["5 & 3", "4 & 1", "7 & 2"]
|
|
42
28
|
},
|
|
43
29
|
"bitwise_and" => {
|
|
44
30
|
name: "bitwise_and",
|
|
45
|
-
description:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"4.bitwise_and(1)",
|
|
49
|
-
"7.bitwise_and(2)"
|
|
50
|
-
]
|
|
31
|
+
description:
|
|
32
|
+
"returns the bitwise and of the integer and another number.",
|
|
33
|
+
examples: %w[5.bitwise_and(3) 4.bitwise_and(1) 7.bitwise_and(2)]
|
|
51
34
|
},
|
|
52
35
|
"*" => {
|
|
53
36
|
name: "*",
|
|
54
37
|
description: "multiplies numbers or repeats text by the integer.",
|
|
55
|
-
examples: [
|
|
56
|
-
"2 * 3",
|
|
57
|
-
"2 * 3.5",
|
|
58
|
-
"3 * :ha"
|
|
59
|
-
]
|
|
38
|
+
examples: ["2 * 3", "2 * 3.5", "3 * :ha"]
|
|
60
39
|
},
|
|
61
40
|
"multiplication" => {
|
|
62
41
|
name: "multiplication",
|
|
63
42
|
description: "multiplies numbers or repeats text by the integer.",
|
|
64
|
-
examples: [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
43
|
+
examples: %w[
|
|
44
|
+
2.multiplication(3)
|
|
45
|
+
2.multiplication(3.5)
|
|
46
|
+
3.multiplication(:ha)
|
|
68
47
|
]
|
|
69
48
|
},
|
|
70
49
|
"×" => {
|
|
71
50
|
name: "×",
|
|
72
51
|
description: "multiplies numbers or repeats text by the integer.",
|
|
73
|
-
examples: [
|
|
74
|
-
"2 × 3",
|
|
75
|
-
"2 × 3.5",
|
|
76
|
-
"3 × :ha"
|
|
77
|
-
]
|
|
52
|
+
examples: ["2 × 3", "2 × 3.5", "3 × :ha"]
|
|
78
53
|
},
|
|
79
54
|
"**" => {
|
|
80
55
|
name: "**",
|
|
81
56
|
description: "returns the integer raised to a power.",
|
|
82
|
-
examples: [
|
|
83
|
-
"2 ** 3",
|
|
84
|
-
"4 ** 2",
|
|
85
|
-
"9 ** 0.5"
|
|
86
|
-
]
|
|
57
|
+
examples: ["2 ** 3", "4 ** 2", "9 ** 0.5"]
|
|
87
58
|
},
|
|
88
59
|
"power" => {
|
|
89
60
|
name: "power",
|
|
90
61
|
description: "returns the integer raised to a power.",
|
|
91
|
-
examples: [
|
|
92
|
-
"2.power(3)",
|
|
93
|
-
"4.power(2)",
|
|
94
|
-
"9.power(0.5)"
|
|
95
|
-
]
|
|
62
|
+
examples: %w[2.power(3) 4.power(2) 9.power(0.5)]
|
|
96
63
|
},
|
|
97
64
|
"power_modulo" => {
|
|
98
65
|
name: "power_modulo",
|
|
@@ -105,295 +72,199 @@ class Code
|
|
|
105
72
|
},
|
|
106
73
|
"+" => {
|
|
107
74
|
name: "+",
|
|
108
|
-
description:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"1 + 2.5",
|
|
112
|
-
"+1"
|
|
113
|
-
]
|
|
75
|
+
description:
|
|
76
|
+
"returns the integer itself when unary, adds numbers, or joins other values as text.",
|
|
77
|
+
examples: ["1 + 2", "1 + 2.5", "+1"]
|
|
114
78
|
},
|
|
115
79
|
"plus" => {
|
|
116
80
|
name: "plus",
|
|
117
81
|
description: "adds numbers or joins non-numeric values as text.",
|
|
118
|
-
examples: [
|
|
119
|
-
"1.plus(2)",
|
|
120
|
-
"1.plus(2.5)",
|
|
121
|
-
"1.plus(:x)"
|
|
122
|
-
]
|
|
82
|
+
examples: %w[1.plus(2) 1.plus(2.5) 1.plus(:x)]
|
|
123
83
|
},
|
|
124
84
|
"-" => {
|
|
125
85
|
name: "-",
|
|
126
|
-
description:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"5 - 2.5",
|
|
130
|
-
"-5"
|
|
131
|
-
]
|
|
86
|
+
description:
|
|
87
|
+
"returns the integer negated when unary or minus another number.",
|
|
88
|
+
examples: ["5 - 1", "5 - 2.5", "-5"]
|
|
132
89
|
},
|
|
133
90
|
"minus" => {
|
|
134
91
|
name: "minus",
|
|
135
92
|
description: "returns the integer minus another number.",
|
|
136
|
-
examples: [
|
|
137
|
-
"5.minus(1)",
|
|
138
|
-
"5.minus(2.5)",
|
|
139
|
-
"1.minus(3)"
|
|
140
|
-
]
|
|
93
|
+
examples: %w[5.minus(1) 5.minus(2.5) 1.minus(3)]
|
|
141
94
|
},
|
|
142
95
|
"unary_minus" => {
|
|
143
96
|
name: "unary_minus",
|
|
144
97
|
description: "returns the negated integer.",
|
|
145
|
-
examples: [
|
|
146
|
-
"5.unary_minus",
|
|
147
|
-
"0.unary_minus",
|
|
148
|
-
"-5.unary_minus"
|
|
149
|
-
]
|
|
98
|
+
examples: %w[5.unary_minus 0.unary_minus -5.unary_minus]
|
|
150
99
|
},
|
|
151
100
|
"/" => {
|
|
152
101
|
name: "/",
|
|
153
|
-
description:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"4 / 2",
|
|
157
|
-
"7 / 3"
|
|
158
|
-
]
|
|
102
|
+
description:
|
|
103
|
+
"returns the integer divided by another number as a decimal.",
|
|
104
|
+
examples: ["5 / 2", "4 / 2", "7 / 3"]
|
|
159
105
|
},
|
|
160
106
|
"division" => {
|
|
161
107
|
name: "division",
|
|
162
|
-
description:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"4.division(2)",
|
|
166
|
-
"7.division(3)"
|
|
167
|
-
]
|
|
108
|
+
description:
|
|
109
|
+
"returns the integer divided by another number as a decimal.",
|
|
110
|
+
examples: %w[5.division(2) 4.division(2) 7.division(3)]
|
|
168
111
|
},
|
|
169
112
|
"÷" => {
|
|
170
113
|
name: "÷",
|
|
171
|
-
description:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"4 ÷ 2",
|
|
175
|
-
"7 ÷ 3"
|
|
176
|
-
]
|
|
114
|
+
description:
|
|
115
|
+
"returns the integer divided by another number as a decimal.",
|
|
116
|
+
examples: ["5 ÷ 2", "4 ÷ 2", "7 ÷ 3"]
|
|
177
117
|
},
|
|
178
118
|
"decimal_divide" => {
|
|
179
119
|
name: "decimal_divide",
|
|
180
|
-
description:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
120
|
+
description:
|
|
121
|
+
"returns the integer divided by another number as a decimal.",
|
|
122
|
+
examples: %w[
|
|
123
|
+
5.decimal_divide(2)
|
|
124
|
+
4.decimal_divide(2)
|
|
125
|
+
7.decimal_divide(3)
|
|
185
126
|
]
|
|
186
127
|
},
|
|
187
128
|
"digits" => {
|
|
188
129
|
name: "digits",
|
|
189
|
-
description:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"123.digits(10)",
|
|
193
|
-
"10.digits(2)"
|
|
194
|
-
]
|
|
130
|
+
description:
|
|
131
|
+
"returns the integer digits in reverse order, optionally for a base.",
|
|
132
|
+
examples: %w[123.digits 123.digits(10) 10.digits(2)]
|
|
195
133
|
},
|
|
196
134
|
"bit_length" => {
|
|
197
135
|
name: "bit_length",
|
|
198
|
-
description:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
"0.bit_length",
|
|
202
|
-
"255.bit_length"
|
|
203
|
-
]
|
|
136
|
+
description:
|
|
137
|
+
"returns the number of bits needed to represent the integer.",
|
|
138
|
+
examples: %w[5.bit_length 0.bit_length 255.bit_length]
|
|
204
139
|
},
|
|
205
140
|
"all_bits?" => {
|
|
206
141
|
name: "all_bits?",
|
|
207
142
|
description: "returns whether every bit in a mask is set.",
|
|
208
|
-
examples: [
|
|
209
|
-
"7.all_bits?(3)",
|
|
210
|
-
"4.all_bits?(3)",
|
|
211
|
-
"0.all_bits?(1)"
|
|
212
|
-
]
|
|
143
|
+
examples: %w[7.all_bits?(3) 4.all_bits?(3) 0.all_bits?(1)]
|
|
213
144
|
},
|
|
214
145
|
"any_bits?" => {
|
|
215
146
|
name: "any_bits?",
|
|
216
147
|
description: "returns whether any bit in a mask is set.",
|
|
217
|
-
examples: [
|
|
218
|
-
"5.any_bits?(1)",
|
|
219
|
-
"4.any_bits?(1)",
|
|
220
|
-
"0.any_bits?(1)"
|
|
221
|
-
]
|
|
148
|
+
examples: %w[5.any_bits?(1) 4.any_bits?(1) 0.any_bits?(1)]
|
|
222
149
|
},
|
|
223
150
|
"no_bits?" => {
|
|
224
151
|
name: "no_bits?",
|
|
225
152
|
description: "returns whether no bits in a mask are set.",
|
|
226
|
-
examples: [
|
|
227
|
-
"4.no_bits?(1)",
|
|
228
|
-
"5.no_bits?(1)",
|
|
229
|
-
"0.no_bits?(1)"
|
|
230
|
-
]
|
|
153
|
+
examples: %w[4.no_bits?(1) 5.no_bits?(1) 0.no_bits?(1)]
|
|
231
154
|
},
|
|
232
155
|
"character" => {
|
|
233
156
|
name: "character",
|
|
234
157
|
description: "returns the character for the integer codepoint.",
|
|
235
|
-
examples: [
|
|
236
|
-
"65.character",
|
|
237
|
-
"97.character",
|
|
238
|
-
"48.character"
|
|
239
|
-
]
|
|
158
|
+
examples: %w[65.character 97.character 48.character]
|
|
240
159
|
},
|
|
241
160
|
"greatest_common_denominator" => {
|
|
242
161
|
name: "greatest_common_denominator",
|
|
243
|
-
description:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
162
|
+
description:
|
|
163
|
+
"returns the greatest common divisor with another integer.",
|
|
164
|
+
examples: %w[
|
|
165
|
+
12.greatest_common_denominator(8)
|
|
166
|
+
21.greatest_common_denominator(14)
|
|
167
|
+
5.greatest_common_denominator(2)
|
|
248
168
|
]
|
|
249
169
|
},
|
|
250
170
|
"lowest_common_multiple" => {
|
|
251
171
|
name: "lowest_common_multiple",
|
|
252
|
-
description:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
172
|
+
description:
|
|
173
|
+
"returns the least common multiple with another integer.",
|
|
174
|
+
examples: %w[
|
|
175
|
+
4.lowest_common_multiple(6)
|
|
176
|
+
3.lowest_common_multiple(7)
|
|
177
|
+
5.lowest_common_multiple(10)
|
|
257
178
|
]
|
|
258
179
|
},
|
|
259
180
|
"<<" => {
|
|
260
181
|
name: "<<",
|
|
261
182
|
description: "returns the integer shifted left by a bit count.",
|
|
262
|
-
examples: [
|
|
263
|
-
"5 << 1",
|
|
264
|
-
"4 << 2",
|
|
265
|
-
"1 << 3"
|
|
266
|
-
]
|
|
183
|
+
examples: ["5 << 1", "4 << 2", "1 << 3"]
|
|
267
184
|
},
|
|
268
185
|
"left_shift" => {
|
|
269
186
|
name: "left_shift",
|
|
270
187
|
description: "returns the integer shifted left by a bit count.",
|
|
271
|
-
examples: [
|
|
272
|
-
"5.left_shift(1)",
|
|
273
|
-
"4.left_shift(2)",
|
|
274
|
-
"1.left_shift(3)"
|
|
275
|
-
]
|
|
188
|
+
examples: %w[5.left_shift(1) 4.left_shift(2) 1.left_shift(3)]
|
|
276
189
|
},
|
|
277
190
|
">>" => {
|
|
278
191
|
name: ">>",
|
|
279
192
|
description: "returns the integer shifted right by a bit count.",
|
|
280
|
-
examples: [
|
|
281
|
-
"5 >> 1",
|
|
282
|
-
"4 >> 1",
|
|
283
|
-
"8 >> 2"
|
|
284
|
-
]
|
|
193
|
+
examples: ["5 >> 1", "4 >> 1", "8 >> 2"]
|
|
285
194
|
},
|
|
286
195
|
"right_shift" => {
|
|
287
196
|
name: "right_shift",
|
|
288
197
|
description: "returns the integer shifted right by a bit count.",
|
|
289
|
-
examples: [
|
|
290
|
-
"5.right_shift(1)",
|
|
291
|
-
"4.right_shift(1)",
|
|
292
|
-
"8.right_shift(2)"
|
|
293
|
-
]
|
|
198
|
+
examples: %w[5.right_shift(1) 4.right_shift(1) 8.right_shift(2)]
|
|
294
199
|
},
|
|
295
200
|
"^" => {
|
|
296
201
|
name: "^",
|
|
297
|
-
description:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
"4 ^ 1",
|
|
301
|
-
"7 ^ 2"
|
|
302
|
-
]
|
|
202
|
+
description:
|
|
203
|
+
"returns the bitwise xor of the integer and another number.",
|
|
204
|
+
examples: ["5 ^ 3", "4 ^ 1", "7 ^ 2"]
|
|
303
205
|
},
|
|
304
206
|
"bitwise_xor" => {
|
|
305
207
|
name: "bitwise_xor",
|
|
306
|
-
description:
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
"4.bitwise_xor(1)",
|
|
310
|
-
"7.bitwise_xor(2)"
|
|
311
|
-
]
|
|
208
|
+
description:
|
|
209
|
+
"returns the bitwise xor of the integer and another number.",
|
|
210
|
+
examples: %w[5.bitwise_xor(3) 4.bitwise_xor(1) 7.bitwise_xor(2)]
|
|
312
211
|
},
|
|
313
212
|
"abs" => {
|
|
314
213
|
name: "abs",
|
|
315
214
|
description: "returns the absolute value of the integer.",
|
|
316
|
-
examples: [
|
|
317
|
-
"-1.abs",
|
|
318
|
-
"1.abs",
|
|
319
|
-
"0.abs"
|
|
320
|
-
]
|
|
215
|
+
examples: %w[-1.abs 1.abs 0.abs]
|
|
321
216
|
},
|
|
322
217
|
"between?" => {
|
|
323
218
|
name: "between?",
|
|
324
219
|
description: "returns whether the integer is between two bounds.",
|
|
325
|
-
examples: [
|
|
326
|
-
"2.between?(1, 3)",
|
|
327
|
-
"4.between?(1, 3)",
|
|
328
|
-
"1.between?(1, 3)"
|
|
329
|
-
]
|
|
220
|
+
examples: ["2.between?(1, 3)", "4.between?(1, 3)", "1.between?(1, 3)"]
|
|
330
221
|
},
|
|
331
222
|
"clamp" => {
|
|
332
223
|
name: "clamp",
|
|
333
224
|
description: "returns the integer constrained between two bounds.",
|
|
334
|
-
examples: [
|
|
335
|
-
"5.clamp(1, 3)",
|
|
336
|
-
"0.clamp(1, 3)",
|
|
337
|
-
"2.clamp(1, 3)"
|
|
338
|
-
]
|
|
225
|
+
examples: ["5.clamp(1, 3)", "0.clamp(1, 3)", "2.clamp(1, 3)"]
|
|
339
226
|
},
|
|
340
227
|
"divide" => {
|
|
341
228
|
name: "divide",
|
|
342
|
-
description:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"10.divide(3)",
|
|
346
|
-
"9.divide(2)"
|
|
347
|
-
]
|
|
229
|
+
description:
|
|
230
|
+
"returns integer division of the integer by another number.",
|
|
231
|
+
examples: %w[5.divide(2) 10.divide(3) 9.divide(2)]
|
|
348
232
|
},
|
|
349
233
|
"divide_modulo" => {
|
|
350
234
|
name: "divide_modulo",
|
|
351
235
|
description: "returns integer division and modulo results as a list.",
|
|
352
|
-
examples: [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
236
|
+
examples: %w[
|
|
237
|
+
5.divide_modulo(2)
|
|
238
|
+
10.divide_modulo(3)
|
|
239
|
+
9.divide_modulo(2)
|
|
356
240
|
]
|
|
357
241
|
},
|
|
358
242
|
"ceil" => {
|
|
359
243
|
name: "ceil",
|
|
360
|
-
description:
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
"123.ceil(-1)",
|
|
364
|
-
"-123.ceil(-1)"
|
|
365
|
-
]
|
|
244
|
+
description:
|
|
245
|
+
"returns the integer rounded toward positive infinity at an optional precision.",
|
|
246
|
+
examples: %w[12.ceil 123.ceil(-1) -123.ceil(-1)]
|
|
366
247
|
},
|
|
367
248
|
"ceil_divide" => {
|
|
368
249
|
name: "ceil_divide",
|
|
369
|
-
description:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
"4.ceil_divide(2)",
|
|
373
|
-
"7.ceil_divide(3)"
|
|
374
|
-
]
|
|
250
|
+
description:
|
|
251
|
+
"returns division by another number rounded up to an integer.",
|
|
252
|
+
examples: %w[5.ceil_divide(2) 4.ceil_divide(2) 7.ceil_divide(3)]
|
|
375
253
|
},
|
|
376
254
|
"day" => {
|
|
377
255
|
name: "day",
|
|
378
256
|
description: "returns a duration of this many days.",
|
|
379
|
-
examples: [
|
|
380
|
-
"1.day",
|
|
381
|
-
"2.day",
|
|
382
|
-
"0.day"
|
|
383
|
-
]
|
|
257
|
+
examples: %w[1.day 2.day 0.day]
|
|
384
258
|
},
|
|
385
259
|
"days" => {
|
|
386
260
|
name: "days",
|
|
387
261
|
description: "returns a duration of this many days.",
|
|
388
|
-
examples: [
|
|
389
|
-
"1.days",
|
|
390
|
-
"2.days",
|
|
391
|
-
"0.days"
|
|
392
|
-
]
|
|
262
|
+
examples: %w[1.days 2.days 0.days]
|
|
393
263
|
},
|
|
394
264
|
"decrement!" => {
|
|
395
265
|
name: "decrement!",
|
|
396
|
-
description:
|
|
266
|
+
description:
|
|
267
|
+
"subtracts a value from the integer in place and returns it.",
|
|
397
268
|
examples: [
|
|
398
269
|
"i = 2 i.decrement!",
|
|
399
270
|
"i = 2 i.decrement!(2)",
|
|
@@ -403,47 +274,28 @@ class Code
|
|
|
403
274
|
"decrement" => {
|
|
404
275
|
name: "decrement",
|
|
405
276
|
description: "returns the integer minus a value, defaulting to one.",
|
|
406
|
-
examples: [
|
|
407
|
-
"2.decrement",
|
|
408
|
-
"2.decrement(2)",
|
|
409
|
-
"0.decrement"
|
|
410
|
-
]
|
|
277
|
+
examples: %w[2.decrement 2.decrement(2) 0.decrement]
|
|
411
278
|
},
|
|
412
279
|
"even?" => {
|
|
413
280
|
name: "even?",
|
|
414
281
|
description: "returns whether the integer is even.",
|
|
415
|
-
examples: [
|
|
416
|
-
"2.even?",
|
|
417
|
-
"1.even?",
|
|
418
|
-
"0.even?"
|
|
419
|
-
]
|
|
282
|
+
examples: %w[2.even? 1.even? 0.even?]
|
|
420
283
|
},
|
|
421
284
|
"floor" => {
|
|
422
285
|
name: "floor",
|
|
423
|
-
description:
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"123.floor(-1)",
|
|
427
|
-
"-123.floor(-1)"
|
|
428
|
-
]
|
|
286
|
+
description:
|
|
287
|
+
"returns the integer rounded toward negative infinity at an optional precision.",
|
|
288
|
+
examples: %w[12.floor 123.floor(-1) -123.floor(-1)]
|
|
429
289
|
},
|
|
430
290
|
"hour" => {
|
|
431
291
|
name: "hour",
|
|
432
292
|
description: "returns a duration of this many hours.",
|
|
433
|
-
examples: [
|
|
434
|
-
"1.hour",
|
|
435
|
-
"2.hour",
|
|
436
|
-
"0.hour"
|
|
437
|
-
]
|
|
293
|
+
examples: %w[1.hour 2.hour 0.hour]
|
|
438
294
|
},
|
|
439
295
|
"hours" => {
|
|
440
296
|
name: "hours",
|
|
441
297
|
description: "returns a duration of this many hours.",
|
|
442
|
-
examples: [
|
|
443
|
-
"1.hours",
|
|
444
|
-
"2.hours",
|
|
445
|
-
"0.hours"
|
|
446
|
-
]
|
|
298
|
+
examples: %w[1.hours 2.hours 0.hours]
|
|
447
299
|
},
|
|
448
300
|
"increment!" => {
|
|
449
301
|
name: "increment!",
|
|
@@ -457,96 +309,57 @@ class Code
|
|
|
457
309
|
"increment" => {
|
|
458
310
|
name: "increment",
|
|
459
311
|
description: "returns the integer plus a value, defaulting to one.",
|
|
460
|
-
examples: [
|
|
461
|
-
"1.increment",
|
|
462
|
-
"1.increment(2)",
|
|
463
|
-
"0.increment"
|
|
464
|
-
]
|
|
312
|
+
examples: %w[1.increment 1.increment(2) 0.increment]
|
|
465
313
|
},
|
|
466
314
|
"odd?" => {
|
|
467
315
|
name: "odd?",
|
|
468
316
|
description: "returns whether the integer is odd.",
|
|
469
|
-
examples: [
|
|
470
|
-
"1.odd?",
|
|
471
|
-
"2.odd?",
|
|
472
|
-
"0.odd?"
|
|
473
|
-
]
|
|
317
|
+
examples: %w[1.odd? 2.odd? 0.odd?]
|
|
474
318
|
},
|
|
475
319
|
"minute" => {
|
|
476
320
|
name: "minute",
|
|
477
321
|
description: "returns a duration of this many minutes.",
|
|
478
|
-
examples: [
|
|
479
|
-
"1.minute",
|
|
480
|
-
"2.minute",
|
|
481
|
-
"0.minute"
|
|
482
|
-
]
|
|
322
|
+
examples: %w[1.minute 2.minute 0.minute]
|
|
483
323
|
},
|
|
484
324
|
"minutes" => {
|
|
485
325
|
name: "minutes",
|
|
486
326
|
description: "returns a duration of this many minutes.",
|
|
487
|
-
examples: [
|
|
488
|
-
"1.minutes",
|
|
489
|
-
"2.minutes",
|
|
490
|
-
"0.minutes"
|
|
491
|
-
]
|
|
327
|
+
examples: %w[1.minutes 2.minutes 0.minutes]
|
|
492
328
|
},
|
|
493
329
|
"month" => {
|
|
494
330
|
name: "month",
|
|
495
331
|
description: "returns a duration of this many months.",
|
|
496
|
-
examples: [
|
|
497
|
-
"1.month",
|
|
498
|
-
"2.month",
|
|
499
|
-
"0.month"
|
|
500
|
-
]
|
|
332
|
+
examples: %w[1.month 2.month 0.month]
|
|
501
333
|
},
|
|
502
334
|
"months" => {
|
|
503
335
|
name: "months",
|
|
504
336
|
description: "returns a duration of this many months.",
|
|
505
|
-
examples: [
|
|
506
|
-
"1.months",
|
|
507
|
-
"2.months",
|
|
508
|
-
"0.months"
|
|
509
|
-
]
|
|
337
|
+
examples: %w[1.months 2.months 0.months]
|
|
510
338
|
},
|
|
511
339
|
"round" => {
|
|
512
340
|
name: "round",
|
|
513
341
|
description: "returns the integer rounded to a precision.",
|
|
514
|
-
examples: [
|
|
515
|
-
"12.round",
|
|
516
|
-
"123.round(-1)",
|
|
517
|
-
"-123.round(-1)"
|
|
518
|
-
]
|
|
342
|
+
examples: %w[12.round 123.round(-1) -123.round(-1)]
|
|
519
343
|
},
|
|
520
344
|
"second" => {
|
|
521
345
|
name: "second",
|
|
522
346
|
description: "returns a duration of this many seconds.",
|
|
523
|
-
examples: [
|
|
524
|
-
"1.second",
|
|
525
|
-
"2.second",
|
|
526
|
-
"0.second"
|
|
527
|
-
]
|
|
347
|
+
examples: %w[1.second 2.second 0.second]
|
|
528
348
|
},
|
|
529
349
|
"seconds" => {
|
|
530
350
|
name: "seconds",
|
|
531
351
|
description: "returns a duration of this many seconds.",
|
|
532
|
-
examples: [
|
|
533
|
-
"1.seconds",
|
|
534
|
-
"2.seconds",
|
|
535
|
-
"0.seconds"
|
|
536
|
-
]
|
|
352
|
+
examples: %w[1.seconds 2.seconds 0.seconds]
|
|
537
353
|
},
|
|
538
354
|
"sqrt" => {
|
|
539
355
|
name: "sqrt",
|
|
540
356
|
description: "returns the square root of the integer.",
|
|
541
|
-
examples: [
|
|
542
|
-
"4.sqrt",
|
|
543
|
-
"9.sqrt",
|
|
544
|
-
"2.sqrt"
|
|
545
|
-
]
|
|
357
|
+
examples: %w[4.sqrt 9.sqrt 2.sqrt]
|
|
546
358
|
},
|
|
547
359
|
"times" => {
|
|
548
360
|
name: "times",
|
|
549
|
-
description:
|
|
361
|
+
description:
|
|
362
|
+
"calls a function once for each number from zero up to the integer and returns the integer.",
|
|
550
363
|
examples: [
|
|
551
364
|
"3.times((i) => { i })",
|
|
552
365
|
"0.times((i) => { i })",
|
|
@@ -555,7 +368,8 @@ class Code
|
|
|
555
368
|
},
|
|
556
369
|
"down_to" => {
|
|
557
370
|
name: "down_to",
|
|
558
|
-
description:
|
|
371
|
+
description:
|
|
372
|
+
"calls a function for each integer from this value down to a target and returns the integer.",
|
|
559
373
|
examples: [
|
|
560
374
|
"3.down_to(1, (i) => { i })",
|
|
561
375
|
"3.down_to(1, (i, index) => { index })",
|
|
@@ -564,7 +378,8 @@ class Code
|
|
|
564
378
|
},
|
|
565
379
|
"up_to" => {
|
|
566
380
|
name: "up_to",
|
|
567
|
-
description:
|
|
381
|
+
description:
|
|
382
|
+
"calls a function for each integer from this value up to a target and returns the integer.",
|
|
568
383
|
examples: [
|
|
569
384
|
"1.up_to(3, (i) => { i })",
|
|
570
385
|
"1.up_to(3, (i, index) => { index })",
|
|
@@ -574,1118 +389,625 @@ class Code
|
|
|
574
389
|
"truncate" => {
|
|
575
390
|
name: "truncate",
|
|
576
391
|
description: "returns the integer truncated to a precision.",
|
|
577
|
-
examples: [
|
|
578
|
-
"12.truncate",
|
|
579
|
-
"123.truncate(-1)",
|
|
580
|
-
"-123.truncate(-1)"
|
|
581
|
-
]
|
|
392
|
+
examples: %w[12.truncate 123.truncate(-1) -123.truncate(-1)]
|
|
582
393
|
},
|
|
583
394
|
"week" => {
|
|
584
395
|
name: "week",
|
|
585
396
|
description: "returns a duration of this many weeks.",
|
|
586
|
-
examples: [
|
|
587
|
-
"1.week",
|
|
588
|
-
"2.week",
|
|
589
|
-
"0.week"
|
|
590
|
-
]
|
|
397
|
+
examples: %w[1.week 2.week 0.week]
|
|
591
398
|
},
|
|
592
399
|
"weeks" => {
|
|
593
400
|
name: "weeks",
|
|
594
401
|
description: "returns a duration of this many weeks.",
|
|
595
|
-
examples: [
|
|
596
|
-
"1.weeks",
|
|
597
|
-
"2.weeks",
|
|
598
|
-
"0.weeks"
|
|
599
|
-
]
|
|
402
|
+
examples: %w[1.weeks 2.weeks 0.weeks]
|
|
600
403
|
},
|
|
601
404
|
"year" => {
|
|
602
405
|
name: "year",
|
|
603
406
|
description: "returns a duration of this many years.",
|
|
604
|
-
examples: [
|
|
605
|
-
"1.year",
|
|
606
|
-
"2.year",
|
|
607
|
-
"0.year"
|
|
608
|
-
]
|
|
407
|
+
examples: %w[1.year 2.year 0.year]
|
|
609
408
|
},
|
|
610
409
|
"years" => {
|
|
611
410
|
name: "years",
|
|
612
411
|
description: "returns a duration of this many years.",
|
|
613
|
-
examples: [
|
|
614
|
-
"1.years",
|
|
615
|
-
"2.years",
|
|
616
|
-
"0.years"
|
|
617
|
-
]
|
|
412
|
+
examples: %w[1.years 2.years 0.years]
|
|
618
413
|
},
|
|
619
414
|
"|" => {
|
|
620
415
|
name: "|",
|
|
621
|
-
description:
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
"4 | 1",
|
|
625
|
-
"7 | 2"
|
|
626
|
-
]
|
|
416
|
+
description:
|
|
417
|
+
"returns the bitwise or of the integer and another number.",
|
|
418
|
+
examples: ["5 | 2", "4 | 1", "7 | 2"]
|
|
627
419
|
},
|
|
628
420
|
"bitwise_or" => {
|
|
629
421
|
name: "bitwise_or",
|
|
630
|
-
description:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
"4.bitwise_or(1)",
|
|
634
|
-
"7.bitwise_or(2)"
|
|
635
|
-
]
|
|
422
|
+
description:
|
|
423
|
+
"returns the bitwise or of the integer and another number.",
|
|
424
|
+
examples: %w[5.bitwise_or(2) 4.bitwise_or(1) 7.bitwise_or(2)]
|
|
636
425
|
},
|
|
637
426
|
"many?" => {
|
|
638
427
|
name: "many?",
|
|
639
428
|
description: "returns whether the integer is greater than one.",
|
|
640
|
-
examples: [
|
|
641
|
-
"2.many?",
|
|
642
|
-
"1.many?",
|
|
643
|
-
"0.many?"
|
|
644
|
-
]
|
|
429
|
+
examples: %w[2.many? 1.many? 0.many?]
|
|
645
430
|
},
|
|
646
431
|
"any?" => {
|
|
647
432
|
name: "any?",
|
|
648
433
|
description: "returns whether the integer is greater than zero.",
|
|
649
|
-
examples: [
|
|
650
|
-
"1.any?",
|
|
651
|
-
"0.any?",
|
|
652
|
-
"-1.any?"
|
|
653
|
-
]
|
|
434
|
+
examples: %w[1.any? 0.any? -1.any?]
|
|
654
435
|
},
|
|
655
436
|
"positive?" => {
|
|
656
437
|
name: "positive?",
|
|
657
438
|
description: "returns whether the integer is positive.",
|
|
658
|
-
examples: [
|
|
659
|
-
"1.positive?",
|
|
660
|
-
"0.positive?",
|
|
661
|
-
"-1.positive?"
|
|
662
|
-
]
|
|
439
|
+
examples: %w[1.positive? 0.positive? -1.positive?]
|
|
663
440
|
},
|
|
664
441
|
"negative?" => {
|
|
665
442
|
name: "negative?",
|
|
666
443
|
description: "returns whether the integer is negative.",
|
|
667
|
-
examples: [
|
|
668
|
-
"-1.negative?",
|
|
669
|
-
"0.negative?",
|
|
670
|
-
"1.negative?"
|
|
671
|
-
]
|
|
444
|
+
examples: %w[-1.negative? 0.negative? 1.negative?]
|
|
672
445
|
},
|
|
673
446
|
"next" => {
|
|
674
447
|
name: "next",
|
|
675
448
|
description: "returns the integer plus one.",
|
|
676
|
-
examples: [
|
|
677
|
-
"1.next",
|
|
678
|
-
"0.next",
|
|
679
|
-
"-1.next"
|
|
680
|
-
]
|
|
449
|
+
examples: %w[1.next 0.next -1.next]
|
|
681
450
|
},
|
|
682
451
|
"successor" => {
|
|
683
452
|
name: "successor",
|
|
684
453
|
description: "returns the integer plus one.",
|
|
685
|
-
examples: [
|
|
686
|
-
"1.successor",
|
|
687
|
-
"0.successor",
|
|
688
|
-
"-1.successor"
|
|
689
|
-
]
|
|
454
|
+
examples: %w[1.successor 0.successor -1.successor]
|
|
690
455
|
},
|
|
691
456
|
"previous" => {
|
|
692
457
|
name: "previous",
|
|
693
458
|
description: "returns the integer minus one.",
|
|
694
|
-
examples: [
|
|
695
|
-
"1.previous",
|
|
696
|
-
"0.previous",
|
|
697
|
-
"-1.previous"
|
|
698
|
-
]
|
|
459
|
+
examples: %w[1.previous 0.previous -1.previous]
|
|
699
460
|
},
|
|
700
461
|
"predecessor" => {
|
|
701
462
|
name: "predecessor",
|
|
702
463
|
description: "returns the integer minus one.",
|
|
703
|
-
examples: [
|
|
704
|
-
"1.predecessor",
|
|
705
|
-
"0.predecessor",
|
|
706
|
-
"-1.predecessor"
|
|
707
|
-
]
|
|
464
|
+
examples: %w[1.predecessor 0.predecessor -1.predecessor]
|
|
708
465
|
},
|
|
709
466
|
"remainder" => {
|
|
710
467
|
name: "remainder",
|
|
711
|
-
description:
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
"10.remainder(3)",
|
|
715
|
-
"9.remainder(2)"
|
|
716
|
-
]
|
|
468
|
+
description:
|
|
469
|
+
"returns the remainder after division by another number.",
|
|
470
|
+
examples: %w[5.remainder(2) 10.remainder(3) 9.remainder(2)]
|
|
717
471
|
},
|
|
718
472
|
"non_zero?" => {
|
|
719
473
|
name: "non_zero?",
|
|
720
474
|
description: "returns whether the integer is not zero.",
|
|
721
|
-
examples: [
|
|
722
|
-
"1.non_zero?",
|
|
723
|
-
"0.non_zero?",
|
|
724
|
-
"-1.non_zero?"
|
|
725
|
-
]
|
|
475
|
+
examples: %w[1.non_zero? 0.non_zero? -1.non_zero?]
|
|
726
476
|
},
|
|
727
477
|
"integer?" => {
|
|
728
478
|
name: "integer?",
|
|
729
479
|
description: "returns whether the value is an integer.",
|
|
730
|
-
examples: [
|
|
731
|
-
"1.integer?",
|
|
732
|
-
"0.integer?",
|
|
733
|
-
"-1.integer?"
|
|
734
|
-
]
|
|
480
|
+
examples: %w[1.integer? 0.integer? -1.integer?]
|
|
735
481
|
},
|
|
736
482
|
"finite?" => {
|
|
737
483
|
name: "finite?",
|
|
738
484
|
description: "returns whether the integer is finite.",
|
|
739
|
-
examples: [
|
|
740
|
-
"1.finite?",
|
|
741
|
-
"0.finite?",
|
|
742
|
-
"-1.finite?"
|
|
743
|
-
]
|
|
485
|
+
examples: %w[1.finite? 0.finite? -1.finite?]
|
|
744
486
|
},
|
|
745
487
|
"infinite?" => {
|
|
746
488
|
name: "infinite?",
|
|
747
489
|
description: "returns whether the integer is infinite.",
|
|
748
|
-
examples: [
|
|
749
|
-
"1.infinite?",
|
|
750
|
-
"0.infinite?",
|
|
751
|
-
"-1.infinite?"
|
|
752
|
-
]
|
|
490
|
+
examples: %w[1.infinite? 0.infinite? -1.infinite?]
|
|
753
491
|
},
|
|
754
492
|
"numerator" => {
|
|
755
493
|
name: "numerator",
|
|
756
494
|
description: "returns the integer numerator.",
|
|
757
|
-
examples: [
|
|
758
|
-
"1.numerator",
|
|
759
|
-
"0.numerator",
|
|
760
|
-
"-1.numerator"
|
|
761
|
-
]
|
|
495
|
+
examples: %w[1.numerator 0.numerator -1.numerator]
|
|
762
496
|
},
|
|
763
497
|
"denominator" => {
|
|
764
498
|
name: "denominator",
|
|
765
499
|
description: "returns one as the integer denominator.",
|
|
766
|
-
examples: [
|
|
767
|
-
"1.denominator",
|
|
768
|
-
"0.denominator",
|
|
769
|
-
"-1.denominator"
|
|
770
|
-
]
|
|
500
|
+
examples: %w[1.denominator 0.denominator -1.denominator]
|
|
771
501
|
},
|
|
772
502
|
"magnitude" => {
|
|
773
503
|
name: "magnitude",
|
|
774
504
|
description: "returns the absolute value of the integer.",
|
|
775
|
-
examples: [
|
|
776
|
-
"-1.magnitude",
|
|
777
|
-
"1.magnitude",
|
|
778
|
-
"0.magnitude"
|
|
779
|
-
]
|
|
505
|
+
examples: %w[-1.magnitude 1.magnitude 0.magnitude]
|
|
780
506
|
},
|
|
781
507
|
"zero?" => {
|
|
782
508
|
name: "zero?",
|
|
783
509
|
description: "returns whether the integer is zero.",
|
|
784
|
-
examples: [
|
|
785
|
-
"0.zero?",
|
|
786
|
-
"1.zero?",
|
|
787
|
-
"-1.zero?"
|
|
788
|
-
]
|
|
510
|
+
examples: %w[0.zero? 1.zero? -1.zero?]
|
|
789
511
|
},
|
|
790
512
|
"one?" => {
|
|
791
513
|
name: "one?",
|
|
792
514
|
description: "returns whether the integer is one.",
|
|
793
|
-
examples: [
|
|
794
|
-
"1.one?",
|
|
795
|
-
"2.one?",
|
|
796
|
-
"0.one?"
|
|
797
|
-
]
|
|
515
|
+
examples: %w[1.one? 2.one? 0.one?]
|
|
798
516
|
},
|
|
799
517
|
"two?" => {
|
|
800
518
|
name: "two?",
|
|
801
519
|
description: "returns whether the integer is two.",
|
|
802
|
-
examples: [
|
|
803
|
-
"2.two?",
|
|
804
|
-
"3.two?",
|
|
805
|
-
"0.two?"
|
|
806
|
-
]
|
|
520
|
+
examples: %w[2.two? 3.two? 0.two?]
|
|
807
521
|
},
|
|
808
522
|
"three?" => {
|
|
809
523
|
name: "three?",
|
|
810
524
|
description: "returns whether the integer is three.",
|
|
811
|
-
examples: [
|
|
812
|
-
"3.three?",
|
|
813
|
-
"4.three?",
|
|
814
|
-
"0.three?"
|
|
815
|
-
]
|
|
525
|
+
examples: %w[3.three? 4.three? 0.three?]
|
|
816
526
|
},
|
|
817
527
|
"four?" => {
|
|
818
528
|
name: "four?",
|
|
819
529
|
description: "returns whether the integer is four.",
|
|
820
|
-
examples: [
|
|
821
|
-
"4.four?",
|
|
822
|
-
"5.four?",
|
|
823
|
-
"0.four?"
|
|
824
|
-
]
|
|
530
|
+
examples: %w[4.four? 5.four? 0.four?]
|
|
825
531
|
},
|
|
826
532
|
"five?" => {
|
|
827
533
|
name: "five?",
|
|
828
534
|
description: "returns whether the integer is five.",
|
|
829
|
-
examples: [
|
|
830
|
-
"5.five?",
|
|
831
|
-
"6.five?",
|
|
832
|
-
"0.five?"
|
|
833
|
-
]
|
|
535
|
+
examples: %w[5.five? 6.five? 0.five?]
|
|
834
536
|
},
|
|
835
537
|
"six?" => {
|
|
836
538
|
name: "six?",
|
|
837
539
|
description: "returns whether the integer is six.",
|
|
838
|
-
examples: [
|
|
839
|
-
"6.six?",
|
|
840
|
-
"7.six?",
|
|
841
|
-
"0.six?"
|
|
842
|
-
]
|
|
540
|
+
examples: %w[6.six? 7.six? 0.six?]
|
|
843
541
|
},
|
|
844
542
|
"seven?" => {
|
|
845
543
|
name: "seven?",
|
|
846
544
|
description: "returns whether the integer is seven.",
|
|
847
|
-
examples: [
|
|
848
|
-
"7.seven?",
|
|
849
|
-
"8.seven?",
|
|
850
|
-
"0.seven?"
|
|
851
|
-
]
|
|
545
|
+
examples: %w[7.seven? 8.seven? 0.seven?]
|
|
852
546
|
},
|
|
853
547
|
"eight?" => {
|
|
854
548
|
name: "eight?",
|
|
855
549
|
description: "returns whether the integer is eight.",
|
|
856
|
-
examples: [
|
|
857
|
-
"8.eight?",
|
|
858
|
-
"9.eight?",
|
|
859
|
-
"0.eight?"
|
|
860
|
-
]
|
|
550
|
+
examples: %w[8.eight? 9.eight? 0.eight?]
|
|
861
551
|
},
|
|
862
552
|
"nine?" => {
|
|
863
553
|
name: "nine?",
|
|
864
554
|
description: "returns whether the integer is nine.",
|
|
865
|
-
examples: [
|
|
866
|
-
"9.nine?",
|
|
867
|
-
"10.nine?",
|
|
868
|
-
"0.nine?"
|
|
869
|
-
]
|
|
555
|
+
examples: %w[9.nine? 10.nine? 0.nine?]
|
|
870
556
|
},
|
|
871
557
|
"ten?" => {
|
|
872
558
|
name: "ten?",
|
|
873
559
|
description: "returns whether the integer is ten.",
|
|
874
|
-
examples: [
|
|
875
|
-
"10.ten?",
|
|
876
|
-
"11.ten?",
|
|
877
|
-
"0.ten?"
|
|
878
|
-
]
|
|
560
|
+
examples: %w[10.ten? 11.ten? 0.ten?]
|
|
879
561
|
},
|
|
880
562
|
"eleven?" => {
|
|
881
563
|
name: "eleven?",
|
|
882
564
|
description: "returns whether the integer is eleven.",
|
|
883
|
-
examples: [
|
|
884
|
-
"11.eleven?",
|
|
885
|
-
"12.eleven?",
|
|
886
|
-
"0.eleven?"
|
|
887
|
-
]
|
|
565
|
+
examples: %w[11.eleven? 12.eleven? 0.eleven?]
|
|
888
566
|
},
|
|
889
567
|
"twelve?" => {
|
|
890
568
|
name: "twelve?",
|
|
891
569
|
description: "returns whether the integer is twelve.",
|
|
892
|
-
examples: [
|
|
893
|
-
"12.twelve?",
|
|
894
|
-
"13.twelve?",
|
|
895
|
-
"0.twelve?"
|
|
896
|
-
]
|
|
570
|
+
examples: %w[12.twelve? 13.twelve? 0.twelve?]
|
|
897
571
|
},
|
|
898
572
|
"thirteen?" => {
|
|
899
573
|
name: "thirteen?",
|
|
900
574
|
description: "returns whether the integer is thirteen.",
|
|
901
|
-
examples: [
|
|
902
|
-
"13.thirteen?",
|
|
903
|
-
"14.thirteen?",
|
|
904
|
-
"0.thirteen?"
|
|
905
|
-
]
|
|
575
|
+
examples: %w[13.thirteen? 14.thirteen? 0.thirteen?]
|
|
906
576
|
},
|
|
907
577
|
"fourteen?" => {
|
|
908
578
|
name: "fourteen?",
|
|
909
579
|
description: "returns whether the integer is fourteen.",
|
|
910
|
-
examples: [
|
|
911
|
-
"14.fourteen?",
|
|
912
|
-
"15.fourteen?",
|
|
913
|
-
"0.fourteen?"
|
|
914
|
-
]
|
|
580
|
+
examples: %w[14.fourteen? 15.fourteen? 0.fourteen?]
|
|
915
581
|
},
|
|
916
582
|
"fifteen?" => {
|
|
917
583
|
name: "fifteen?",
|
|
918
584
|
description: "returns whether the integer is fifteen.",
|
|
919
|
-
examples: [
|
|
920
|
-
"15.fifteen?",
|
|
921
|
-
"16.fifteen?",
|
|
922
|
-
"0.fifteen?"
|
|
923
|
-
]
|
|
585
|
+
examples: %w[15.fifteen? 16.fifteen? 0.fifteen?]
|
|
924
586
|
},
|
|
925
587
|
"sixteen?" => {
|
|
926
588
|
name: "sixteen?",
|
|
927
589
|
description: "returns whether the integer is sixteen.",
|
|
928
|
-
examples: [
|
|
929
|
-
"16.sixteen?",
|
|
930
|
-
"17.sixteen?",
|
|
931
|
-
"0.sixteen?"
|
|
932
|
-
]
|
|
590
|
+
examples: %w[16.sixteen? 17.sixteen? 0.sixteen?]
|
|
933
591
|
},
|
|
934
592
|
"seventeen?" => {
|
|
935
593
|
name: "seventeen?",
|
|
936
594
|
description: "returns whether the integer is seventeen.",
|
|
937
|
-
examples: [
|
|
938
|
-
"17.seventeen?",
|
|
939
|
-
"18.seventeen?",
|
|
940
|
-
"0.seventeen?"
|
|
941
|
-
]
|
|
595
|
+
examples: %w[17.seventeen? 18.seventeen? 0.seventeen?]
|
|
942
596
|
},
|
|
943
597
|
"eighteen?" => {
|
|
944
598
|
name: "eighteen?",
|
|
945
599
|
description: "returns whether the integer is eighteen.",
|
|
946
|
-
examples: [
|
|
947
|
-
"18.eighteen?",
|
|
948
|
-
"19.eighteen?",
|
|
949
|
-
"0.eighteen?"
|
|
950
|
-
]
|
|
600
|
+
examples: %w[18.eighteen? 19.eighteen? 0.eighteen?]
|
|
951
601
|
},
|
|
952
602
|
"nineteen?" => {
|
|
953
603
|
name: "nineteen?",
|
|
954
604
|
description: "returns whether the integer is nineteen.",
|
|
955
|
-
examples: [
|
|
956
|
-
"19.nineteen?",
|
|
957
|
-
"20.nineteen?",
|
|
958
|
-
"0.nineteen?"
|
|
959
|
-
]
|
|
605
|
+
examples: %w[19.nineteen? 20.nineteen? 0.nineteen?]
|
|
960
606
|
},
|
|
961
607
|
"twenty?" => {
|
|
962
608
|
name: "twenty?",
|
|
963
609
|
description: "returns whether the integer is twenty.",
|
|
964
|
-
examples: [
|
|
965
|
-
"20.twenty?",
|
|
966
|
-
"21.twenty?",
|
|
967
|
-
"0.twenty?"
|
|
968
|
-
]
|
|
610
|
+
examples: %w[20.twenty? 21.twenty? 0.twenty?]
|
|
969
611
|
},
|
|
970
612
|
"twenty_one?" => {
|
|
971
613
|
name: "twenty_one?",
|
|
972
614
|
description: "returns whether the integer is twenty one.",
|
|
973
|
-
examples: [
|
|
974
|
-
"21.twenty_one?",
|
|
975
|
-
"22.twenty_one?",
|
|
976
|
-
"0.twenty_one?"
|
|
977
|
-
]
|
|
615
|
+
examples: %w[21.twenty_one? 22.twenty_one? 0.twenty_one?]
|
|
978
616
|
},
|
|
979
617
|
"twenty_two?" => {
|
|
980
618
|
name: "twenty_two?",
|
|
981
619
|
description: "returns whether the integer is twenty two.",
|
|
982
|
-
examples: [
|
|
983
|
-
"22.twenty_two?",
|
|
984
|
-
"23.twenty_two?",
|
|
985
|
-
"0.twenty_two?"
|
|
986
|
-
]
|
|
620
|
+
examples: %w[22.twenty_two? 23.twenty_two? 0.twenty_two?]
|
|
987
621
|
},
|
|
988
622
|
"twenty_three?" => {
|
|
989
623
|
name: "twenty_three?",
|
|
990
624
|
description: "returns whether the integer is twenty three.",
|
|
991
|
-
examples: [
|
|
992
|
-
"23.twenty_three?",
|
|
993
|
-
"24.twenty_three?",
|
|
994
|
-
"0.twenty_three?"
|
|
995
|
-
]
|
|
625
|
+
examples: %w[23.twenty_three? 24.twenty_three? 0.twenty_three?]
|
|
996
626
|
},
|
|
997
627
|
"twenty_four?" => {
|
|
998
628
|
name: "twenty_four?",
|
|
999
629
|
description: "returns whether the integer is twenty four.",
|
|
1000
|
-
examples: [
|
|
1001
|
-
"24.twenty_four?",
|
|
1002
|
-
"25.twenty_four?",
|
|
1003
|
-
"0.twenty_four?"
|
|
1004
|
-
]
|
|
630
|
+
examples: %w[24.twenty_four? 25.twenty_four? 0.twenty_four?]
|
|
1005
631
|
},
|
|
1006
632
|
"twenty_five?" => {
|
|
1007
633
|
name: "twenty_five?",
|
|
1008
634
|
description: "returns whether the integer is twenty five.",
|
|
1009
|
-
examples: [
|
|
1010
|
-
"25.twenty_five?",
|
|
1011
|
-
"26.twenty_five?",
|
|
1012
|
-
"0.twenty_five?"
|
|
1013
|
-
]
|
|
635
|
+
examples: %w[25.twenty_five? 26.twenty_five? 0.twenty_five?]
|
|
1014
636
|
},
|
|
1015
637
|
"twenty_six?" => {
|
|
1016
638
|
name: "twenty_six?",
|
|
1017
639
|
description: "returns whether the integer is twenty six.",
|
|
1018
|
-
examples: [
|
|
1019
|
-
"26.twenty_six?",
|
|
1020
|
-
"27.twenty_six?",
|
|
1021
|
-
"0.twenty_six?"
|
|
1022
|
-
]
|
|
640
|
+
examples: %w[26.twenty_six? 27.twenty_six? 0.twenty_six?]
|
|
1023
641
|
},
|
|
1024
642
|
"twenty_seven?" => {
|
|
1025
643
|
name: "twenty_seven?",
|
|
1026
644
|
description: "returns whether the integer is twenty seven.",
|
|
1027
|
-
examples: [
|
|
1028
|
-
"27.twenty_seven?",
|
|
1029
|
-
"28.twenty_seven?",
|
|
1030
|
-
"0.twenty_seven?"
|
|
1031
|
-
]
|
|
645
|
+
examples: %w[27.twenty_seven? 28.twenty_seven? 0.twenty_seven?]
|
|
1032
646
|
},
|
|
1033
647
|
"twenty_eight?" => {
|
|
1034
648
|
name: "twenty_eight?",
|
|
1035
649
|
description: "returns whether the integer is twenty eight.",
|
|
1036
|
-
examples: [
|
|
1037
|
-
"28.twenty_eight?",
|
|
1038
|
-
"29.twenty_eight?",
|
|
1039
|
-
"0.twenty_eight?"
|
|
1040
|
-
]
|
|
650
|
+
examples: %w[28.twenty_eight? 29.twenty_eight? 0.twenty_eight?]
|
|
1041
651
|
},
|
|
1042
652
|
"twenty_nine?" => {
|
|
1043
653
|
name: "twenty_nine?",
|
|
1044
654
|
description: "returns whether the integer is twenty nine.",
|
|
1045
|
-
examples: [
|
|
1046
|
-
"29.twenty_nine?",
|
|
1047
|
-
"30.twenty_nine?",
|
|
1048
|
-
"0.twenty_nine?"
|
|
1049
|
-
]
|
|
655
|
+
examples: %w[29.twenty_nine? 30.twenty_nine? 0.twenty_nine?]
|
|
1050
656
|
},
|
|
1051
657
|
"thirty?" => {
|
|
1052
658
|
name: "thirty?",
|
|
1053
659
|
description: "returns whether the integer is thirty.",
|
|
1054
|
-
examples: [
|
|
1055
|
-
"30.thirty?",
|
|
1056
|
-
"31.thirty?",
|
|
1057
|
-
"0.thirty?"
|
|
1058
|
-
]
|
|
660
|
+
examples: %w[30.thirty? 31.thirty? 0.thirty?]
|
|
1059
661
|
},
|
|
1060
662
|
"thirty_one?" => {
|
|
1061
663
|
name: "thirty_one?",
|
|
1062
664
|
description: "returns whether the integer is thirty one.",
|
|
1063
|
-
examples: [
|
|
1064
|
-
"31.thirty_one?",
|
|
1065
|
-
"32.thirty_one?",
|
|
1066
|
-
"0.thirty_one?"
|
|
1067
|
-
]
|
|
665
|
+
examples: %w[31.thirty_one? 32.thirty_one? 0.thirty_one?]
|
|
1068
666
|
},
|
|
1069
667
|
"thirty_two?" => {
|
|
1070
668
|
name: "thirty_two?",
|
|
1071
669
|
description: "returns whether the integer is thirty two.",
|
|
1072
|
-
examples: [
|
|
1073
|
-
"32.thirty_two?",
|
|
1074
|
-
"33.thirty_two?",
|
|
1075
|
-
"0.thirty_two?"
|
|
1076
|
-
]
|
|
670
|
+
examples: %w[32.thirty_two? 33.thirty_two? 0.thirty_two?]
|
|
1077
671
|
},
|
|
1078
672
|
"thirty_three?" => {
|
|
1079
673
|
name: "thirty_three?",
|
|
1080
674
|
description: "returns whether the integer is thirty three.",
|
|
1081
|
-
examples: [
|
|
1082
|
-
"33.thirty_three?",
|
|
1083
|
-
"34.thirty_three?",
|
|
1084
|
-
"0.thirty_three?"
|
|
1085
|
-
]
|
|
675
|
+
examples: %w[33.thirty_three? 34.thirty_three? 0.thirty_three?]
|
|
1086
676
|
},
|
|
1087
677
|
"thirty_four?" => {
|
|
1088
678
|
name: "thirty_four?",
|
|
1089
679
|
description: "returns whether the integer is thirty four.",
|
|
1090
|
-
examples: [
|
|
1091
|
-
"34.thirty_four?",
|
|
1092
|
-
"35.thirty_four?",
|
|
1093
|
-
"0.thirty_four?"
|
|
1094
|
-
]
|
|
680
|
+
examples: %w[34.thirty_four? 35.thirty_four? 0.thirty_four?]
|
|
1095
681
|
},
|
|
1096
682
|
"thirty_five?" => {
|
|
1097
683
|
name: "thirty_five?",
|
|
1098
684
|
description: "returns whether the integer is thirty five.",
|
|
1099
|
-
examples: [
|
|
1100
|
-
"35.thirty_five?",
|
|
1101
|
-
"36.thirty_five?",
|
|
1102
|
-
"0.thirty_five?"
|
|
1103
|
-
]
|
|
685
|
+
examples: %w[35.thirty_five? 36.thirty_five? 0.thirty_five?]
|
|
1104
686
|
},
|
|
1105
687
|
"thirty_six?" => {
|
|
1106
688
|
name: "thirty_six?",
|
|
1107
689
|
description: "returns whether the integer is thirty six.",
|
|
1108
|
-
examples: [
|
|
1109
|
-
"36.thirty_six?",
|
|
1110
|
-
"37.thirty_six?",
|
|
1111
|
-
"0.thirty_six?"
|
|
1112
|
-
]
|
|
690
|
+
examples: %w[36.thirty_six? 37.thirty_six? 0.thirty_six?]
|
|
1113
691
|
},
|
|
1114
692
|
"thirty_seven?" => {
|
|
1115
693
|
name: "thirty_seven?",
|
|
1116
694
|
description: "returns whether the integer is thirty seven.",
|
|
1117
|
-
examples: [
|
|
1118
|
-
"37.thirty_seven?",
|
|
1119
|
-
"38.thirty_seven?",
|
|
1120
|
-
"0.thirty_seven?"
|
|
1121
|
-
]
|
|
695
|
+
examples: %w[37.thirty_seven? 38.thirty_seven? 0.thirty_seven?]
|
|
1122
696
|
},
|
|
1123
697
|
"thirty_eight?" => {
|
|
1124
698
|
name: "thirty_eight?",
|
|
1125
699
|
description: "returns whether the integer is thirty eight.",
|
|
1126
|
-
examples: [
|
|
1127
|
-
"38.thirty_eight?",
|
|
1128
|
-
"39.thirty_eight?",
|
|
1129
|
-
"0.thirty_eight?"
|
|
1130
|
-
]
|
|
700
|
+
examples: %w[38.thirty_eight? 39.thirty_eight? 0.thirty_eight?]
|
|
1131
701
|
},
|
|
1132
702
|
"thirty_nine?" => {
|
|
1133
703
|
name: "thirty_nine?",
|
|
1134
704
|
description: "returns whether the integer is thirty nine.",
|
|
1135
|
-
examples: [
|
|
1136
|
-
"39.thirty_nine?",
|
|
1137
|
-
"40.thirty_nine?",
|
|
1138
|
-
"0.thirty_nine?"
|
|
1139
|
-
]
|
|
705
|
+
examples: %w[39.thirty_nine? 40.thirty_nine? 0.thirty_nine?]
|
|
1140
706
|
},
|
|
1141
707
|
"forty?" => {
|
|
1142
708
|
name: "forty?",
|
|
1143
709
|
description: "returns whether the integer is forty.",
|
|
1144
|
-
examples: [
|
|
1145
|
-
"40.forty?",
|
|
1146
|
-
"41.forty?",
|
|
1147
|
-
"0.forty?"
|
|
1148
|
-
]
|
|
710
|
+
examples: %w[40.forty? 41.forty? 0.forty?]
|
|
1149
711
|
},
|
|
1150
712
|
"forty_one?" => {
|
|
1151
713
|
name: "forty_one?",
|
|
1152
714
|
description: "returns whether the integer is forty one.",
|
|
1153
|
-
examples: [
|
|
1154
|
-
"41.forty_one?",
|
|
1155
|
-
"42.forty_one?",
|
|
1156
|
-
"0.forty_one?"
|
|
1157
|
-
]
|
|
715
|
+
examples: %w[41.forty_one? 42.forty_one? 0.forty_one?]
|
|
1158
716
|
},
|
|
1159
717
|
"forty_two?" => {
|
|
1160
718
|
name: "forty_two?",
|
|
1161
719
|
description: "returns whether the integer is forty two.",
|
|
1162
|
-
examples: [
|
|
1163
|
-
"42.forty_two?",
|
|
1164
|
-
"43.forty_two?",
|
|
1165
|
-
"0.forty_two?"
|
|
1166
|
-
]
|
|
720
|
+
examples: %w[42.forty_two? 43.forty_two? 0.forty_two?]
|
|
1167
721
|
},
|
|
1168
722
|
"forty_three?" => {
|
|
1169
723
|
name: "forty_three?",
|
|
1170
724
|
description: "returns whether the integer is forty three.",
|
|
1171
|
-
examples: [
|
|
1172
|
-
"43.forty_three?",
|
|
1173
|
-
"44.forty_three?",
|
|
1174
|
-
"0.forty_three?"
|
|
1175
|
-
]
|
|
725
|
+
examples: %w[43.forty_three? 44.forty_three? 0.forty_three?]
|
|
1176
726
|
},
|
|
1177
727
|
"forty_four?" => {
|
|
1178
728
|
name: "forty_four?",
|
|
1179
729
|
description: "returns whether the integer is forty four.",
|
|
1180
|
-
examples: [
|
|
1181
|
-
"44.forty_four?",
|
|
1182
|
-
"45.forty_four?",
|
|
1183
|
-
"0.forty_four?"
|
|
1184
|
-
]
|
|
730
|
+
examples: %w[44.forty_four? 45.forty_four? 0.forty_four?]
|
|
1185
731
|
},
|
|
1186
732
|
"forty_five?" => {
|
|
1187
733
|
name: "forty_five?",
|
|
1188
734
|
description: "returns whether the integer is forty five.",
|
|
1189
|
-
examples: [
|
|
1190
|
-
"45.forty_five?",
|
|
1191
|
-
"46.forty_five?",
|
|
1192
|
-
"0.forty_five?"
|
|
1193
|
-
]
|
|
735
|
+
examples: %w[45.forty_five? 46.forty_five? 0.forty_five?]
|
|
1194
736
|
},
|
|
1195
737
|
"forty_six?" => {
|
|
1196
738
|
name: "forty_six?",
|
|
1197
739
|
description: "returns whether the integer is forty six.",
|
|
1198
|
-
examples: [
|
|
1199
|
-
"46.forty_six?",
|
|
1200
|
-
"47.forty_six?",
|
|
1201
|
-
"0.forty_six?"
|
|
1202
|
-
]
|
|
740
|
+
examples: %w[46.forty_six? 47.forty_six? 0.forty_six?]
|
|
1203
741
|
},
|
|
1204
742
|
"forty_seven?" => {
|
|
1205
743
|
name: "forty_seven?",
|
|
1206
744
|
description: "returns whether the integer is forty seven.",
|
|
1207
|
-
examples: [
|
|
1208
|
-
"47.forty_seven?",
|
|
1209
|
-
"48.forty_seven?",
|
|
1210
|
-
"0.forty_seven?"
|
|
1211
|
-
]
|
|
745
|
+
examples: %w[47.forty_seven? 48.forty_seven? 0.forty_seven?]
|
|
1212
746
|
},
|
|
1213
747
|
"forty_eight?" => {
|
|
1214
748
|
name: "forty_eight?",
|
|
1215
749
|
description: "returns whether the integer is forty eight.",
|
|
1216
|
-
examples: [
|
|
1217
|
-
"48.forty_eight?",
|
|
1218
|
-
"49.forty_eight?",
|
|
1219
|
-
"0.forty_eight?"
|
|
1220
|
-
]
|
|
750
|
+
examples: %w[48.forty_eight? 49.forty_eight? 0.forty_eight?]
|
|
1221
751
|
},
|
|
1222
752
|
"forty_nine?" => {
|
|
1223
753
|
name: "forty_nine?",
|
|
1224
754
|
description: "returns whether the integer is forty nine.",
|
|
1225
|
-
examples: [
|
|
1226
|
-
"49.forty_nine?",
|
|
1227
|
-
"50.forty_nine?",
|
|
1228
|
-
"0.forty_nine?"
|
|
1229
|
-
]
|
|
755
|
+
examples: %w[49.forty_nine? 50.forty_nine? 0.forty_nine?]
|
|
1230
756
|
},
|
|
1231
757
|
"fifty?" => {
|
|
1232
758
|
name: "fifty?",
|
|
1233
759
|
description: "returns whether the integer is fifty.",
|
|
1234
|
-
examples: [
|
|
1235
|
-
"50.fifty?",
|
|
1236
|
-
"51.fifty?",
|
|
1237
|
-
"0.fifty?"
|
|
1238
|
-
]
|
|
760
|
+
examples: %w[50.fifty? 51.fifty? 0.fifty?]
|
|
1239
761
|
},
|
|
1240
762
|
"fifty_one?" => {
|
|
1241
763
|
name: "fifty_one?",
|
|
1242
764
|
description: "returns whether the integer is fifty one.",
|
|
1243
|
-
examples: [
|
|
1244
|
-
"51.fifty_one?",
|
|
1245
|
-
"52.fifty_one?",
|
|
1246
|
-
"0.fifty_one?"
|
|
1247
|
-
]
|
|
765
|
+
examples: %w[51.fifty_one? 52.fifty_one? 0.fifty_one?]
|
|
1248
766
|
},
|
|
1249
767
|
"fifty_two?" => {
|
|
1250
768
|
name: "fifty_two?",
|
|
1251
769
|
description: "returns whether the integer is fifty two.",
|
|
1252
|
-
examples: [
|
|
1253
|
-
"52.fifty_two?",
|
|
1254
|
-
"53.fifty_two?",
|
|
1255
|
-
"0.fifty_two?"
|
|
1256
|
-
]
|
|
770
|
+
examples: %w[52.fifty_two? 53.fifty_two? 0.fifty_two?]
|
|
1257
771
|
},
|
|
1258
772
|
"fifty_three?" => {
|
|
1259
773
|
name: "fifty_three?",
|
|
1260
774
|
description: "returns whether the integer is fifty three.",
|
|
1261
|
-
examples: [
|
|
1262
|
-
"53.fifty_three?",
|
|
1263
|
-
"54.fifty_three?",
|
|
1264
|
-
"0.fifty_three?"
|
|
1265
|
-
]
|
|
775
|
+
examples: %w[53.fifty_three? 54.fifty_three? 0.fifty_three?]
|
|
1266
776
|
},
|
|
1267
777
|
"fifty_four?" => {
|
|
1268
778
|
name: "fifty_four?",
|
|
1269
779
|
description: "returns whether the integer is fifty four.",
|
|
1270
|
-
examples: [
|
|
1271
|
-
"54.fifty_four?",
|
|
1272
|
-
"55.fifty_four?",
|
|
1273
|
-
"0.fifty_four?"
|
|
1274
|
-
]
|
|
780
|
+
examples: %w[54.fifty_four? 55.fifty_four? 0.fifty_four?]
|
|
1275
781
|
},
|
|
1276
782
|
"fifty_five?" => {
|
|
1277
783
|
name: "fifty_five?",
|
|
1278
784
|
description: "returns whether the integer is fifty five.",
|
|
1279
|
-
examples: [
|
|
1280
|
-
"55.fifty_five?",
|
|
1281
|
-
"56.fifty_five?",
|
|
1282
|
-
"0.fifty_five?"
|
|
1283
|
-
]
|
|
785
|
+
examples: %w[55.fifty_five? 56.fifty_five? 0.fifty_five?]
|
|
1284
786
|
},
|
|
1285
787
|
"fifty_six?" => {
|
|
1286
788
|
name: "fifty_six?",
|
|
1287
789
|
description: "returns whether the integer is fifty six.",
|
|
1288
|
-
examples: [
|
|
1289
|
-
"56.fifty_six?",
|
|
1290
|
-
"57.fifty_six?",
|
|
1291
|
-
"0.fifty_six?"
|
|
1292
|
-
]
|
|
790
|
+
examples: %w[56.fifty_six? 57.fifty_six? 0.fifty_six?]
|
|
1293
791
|
},
|
|
1294
792
|
"fifty_seven?" => {
|
|
1295
793
|
name: "fifty_seven?",
|
|
1296
794
|
description: "returns whether the integer is fifty seven.",
|
|
1297
|
-
examples: [
|
|
1298
|
-
"57.fifty_seven?",
|
|
1299
|
-
"58.fifty_seven?",
|
|
1300
|
-
"0.fifty_seven?"
|
|
1301
|
-
]
|
|
795
|
+
examples: %w[57.fifty_seven? 58.fifty_seven? 0.fifty_seven?]
|
|
1302
796
|
},
|
|
1303
797
|
"fifty_eight?" => {
|
|
1304
798
|
name: "fifty_eight?",
|
|
1305
799
|
description: "returns whether the integer is fifty eight.",
|
|
1306
|
-
examples: [
|
|
1307
|
-
"58.fifty_eight?",
|
|
1308
|
-
"59.fifty_eight?",
|
|
1309
|
-
"0.fifty_eight?"
|
|
1310
|
-
]
|
|
800
|
+
examples: %w[58.fifty_eight? 59.fifty_eight? 0.fifty_eight?]
|
|
1311
801
|
},
|
|
1312
802
|
"fifty_nine?" => {
|
|
1313
803
|
name: "fifty_nine?",
|
|
1314
804
|
description: "returns whether the integer is fifty nine.",
|
|
1315
|
-
examples: [
|
|
1316
|
-
"59.fifty_nine?",
|
|
1317
|
-
"60.fifty_nine?",
|
|
1318
|
-
"0.fifty_nine?"
|
|
1319
|
-
]
|
|
805
|
+
examples: %w[59.fifty_nine? 60.fifty_nine? 0.fifty_nine?]
|
|
1320
806
|
},
|
|
1321
807
|
"sixty?" => {
|
|
1322
808
|
name: "sixty?",
|
|
1323
809
|
description: "returns whether the integer is sixty.",
|
|
1324
|
-
examples: [
|
|
1325
|
-
"60.sixty?",
|
|
1326
|
-
"61.sixty?",
|
|
1327
|
-
"0.sixty?"
|
|
1328
|
-
]
|
|
810
|
+
examples: %w[60.sixty? 61.sixty? 0.sixty?]
|
|
1329
811
|
},
|
|
1330
812
|
"sixty_one?" => {
|
|
1331
813
|
name: "sixty_one?",
|
|
1332
814
|
description: "returns whether the integer is sixty one.",
|
|
1333
|
-
examples: [
|
|
1334
|
-
"61.sixty_one?",
|
|
1335
|
-
"62.sixty_one?",
|
|
1336
|
-
"0.sixty_one?"
|
|
1337
|
-
]
|
|
815
|
+
examples: %w[61.sixty_one? 62.sixty_one? 0.sixty_one?]
|
|
1338
816
|
},
|
|
1339
817
|
"sixty_two?" => {
|
|
1340
818
|
name: "sixty_two?",
|
|
1341
819
|
description: "returns whether the integer is sixty two.",
|
|
1342
|
-
examples: [
|
|
1343
|
-
"62.sixty_two?",
|
|
1344
|
-
"63.sixty_two?",
|
|
1345
|
-
"0.sixty_two?"
|
|
1346
|
-
]
|
|
820
|
+
examples: %w[62.sixty_two? 63.sixty_two? 0.sixty_two?]
|
|
1347
821
|
},
|
|
1348
822
|
"sixty_three?" => {
|
|
1349
823
|
name: "sixty_three?",
|
|
1350
824
|
description: "returns whether the integer is sixty three.",
|
|
1351
|
-
examples: [
|
|
1352
|
-
"63.sixty_three?",
|
|
1353
|
-
"64.sixty_three?",
|
|
1354
|
-
"0.sixty_three?"
|
|
1355
|
-
]
|
|
825
|
+
examples: %w[63.sixty_three? 64.sixty_three? 0.sixty_three?]
|
|
1356
826
|
},
|
|
1357
827
|
"sixty_four?" => {
|
|
1358
828
|
name: "sixty_four?",
|
|
1359
829
|
description: "returns whether the integer is sixty four.",
|
|
1360
|
-
examples: [
|
|
1361
|
-
"64.sixty_four?",
|
|
1362
|
-
"65.sixty_four?",
|
|
1363
|
-
"0.sixty_four?"
|
|
1364
|
-
]
|
|
830
|
+
examples: %w[64.sixty_four? 65.sixty_four? 0.sixty_four?]
|
|
1365
831
|
},
|
|
1366
832
|
"sixty_five?" => {
|
|
1367
833
|
name: "sixty_five?",
|
|
1368
834
|
description: "returns whether the integer is sixty five.",
|
|
1369
|
-
examples: [
|
|
1370
|
-
"65.sixty_five?",
|
|
1371
|
-
"66.sixty_five?",
|
|
1372
|
-
"0.sixty_five?"
|
|
1373
|
-
]
|
|
835
|
+
examples: %w[65.sixty_five? 66.sixty_five? 0.sixty_five?]
|
|
1374
836
|
},
|
|
1375
837
|
"sixty_six?" => {
|
|
1376
838
|
name: "sixty_six?",
|
|
1377
839
|
description: "returns whether the integer is sixty six.",
|
|
1378
|
-
examples: [
|
|
1379
|
-
"66.sixty_six?",
|
|
1380
|
-
"67.sixty_six?",
|
|
1381
|
-
"0.sixty_six?"
|
|
1382
|
-
]
|
|
840
|
+
examples: %w[66.sixty_six? 67.sixty_six? 0.sixty_six?]
|
|
1383
841
|
},
|
|
1384
842
|
"sixty_seven?" => {
|
|
1385
843
|
name: "sixty_seven?",
|
|
1386
844
|
description: "returns whether the integer is sixty seven.",
|
|
1387
|
-
examples: [
|
|
1388
|
-
"67.sixty_seven?",
|
|
1389
|
-
"68.sixty_seven?",
|
|
1390
|
-
"0.sixty_seven?"
|
|
1391
|
-
]
|
|
845
|
+
examples: %w[67.sixty_seven? 68.sixty_seven? 0.sixty_seven?]
|
|
1392
846
|
},
|
|
1393
847
|
"sixty_eight?" => {
|
|
1394
848
|
name: "sixty_eight?",
|
|
1395
849
|
description: "returns whether the integer is sixty eight.",
|
|
1396
|
-
examples: [
|
|
1397
|
-
"68.sixty_eight?",
|
|
1398
|
-
"69.sixty_eight?",
|
|
1399
|
-
"0.sixty_eight?"
|
|
1400
|
-
]
|
|
850
|
+
examples: %w[68.sixty_eight? 69.sixty_eight? 0.sixty_eight?]
|
|
1401
851
|
},
|
|
1402
852
|
"sixty_nine?" => {
|
|
1403
853
|
name: "sixty_nine?",
|
|
1404
854
|
description: "returns whether the integer is sixty nine.",
|
|
1405
|
-
examples: [
|
|
1406
|
-
"69.sixty_nine?",
|
|
1407
|
-
"70.sixty_nine?",
|
|
1408
|
-
"0.sixty_nine?"
|
|
1409
|
-
]
|
|
855
|
+
examples: %w[69.sixty_nine? 70.sixty_nine? 0.sixty_nine?]
|
|
1410
856
|
},
|
|
1411
857
|
"seventy?" => {
|
|
1412
858
|
name: "seventy?",
|
|
1413
859
|
description: "returns whether the integer is seventy.",
|
|
1414
|
-
examples: [
|
|
1415
|
-
"70.seventy?",
|
|
1416
|
-
"71.seventy?",
|
|
1417
|
-
"0.seventy?"
|
|
1418
|
-
]
|
|
860
|
+
examples: %w[70.seventy? 71.seventy? 0.seventy?]
|
|
1419
861
|
},
|
|
1420
862
|
"seventy_one?" => {
|
|
1421
863
|
name: "seventy_one?",
|
|
1422
864
|
description: "returns whether the integer is seventy one.",
|
|
1423
|
-
examples: [
|
|
1424
|
-
"71.seventy_one?",
|
|
1425
|
-
"72.seventy_one?",
|
|
1426
|
-
"0.seventy_one?"
|
|
1427
|
-
]
|
|
865
|
+
examples: %w[71.seventy_one? 72.seventy_one? 0.seventy_one?]
|
|
1428
866
|
},
|
|
1429
867
|
"seventy_two?" => {
|
|
1430
868
|
name: "seventy_two?",
|
|
1431
869
|
description: "returns whether the integer is seventy two.",
|
|
1432
|
-
examples: [
|
|
1433
|
-
"72.seventy_two?",
|
|
1434
|
-
"73.seventy_two?",
|
|
1435
|
-
"0.seventy_two?"
|
|
1436
|
-
]
|
|
870
|
+
examples: %w[72.seventy_two? 73.seventy_two? 0.seventy_two?]
|
|
1437
871
|
},
|
|
1438
872
|
"seventy_three?" => {
|
|
1439
873
|
name: "seventy_three?",
|
|
1440
874
|
description: "returns whether the integer is seventy three.",
|
|
1441
|
-
examples: [
|
|
1442
|
-
"73.seventy_three?",
|
|
1443
|
-
"74.seventy_three?",
|
|
1444
|
-
"0.seventy_three?"
|
|
1445
|
-
]
|
|
875
|
+
examples: %w[73.seventy_three? 74.seventy_three? 0.seventy_three?]
|
|
1446
876
|
},
|
|
1447
877
|
"seventy_four?" => {
|
|
1448
878
|
name: "seventy_four?",
|
|
1449
879
|
description: "returns whether the integer is seventy four.",
|
|
1450
|
-
examples: [
|
|
1451
|
-
"74.seventy_four?",
|
|
1452
|
-
"75.seventy_four?",
|
|
1453
|
-
"0.seventy_four?"
|
|
1454
|
-
]
|
|
880
|
+
examples: %w[74.seventy_four? 75.seventy_four? 0.seventy_four?]
|
|
1455
881
|
},
|
|
1456
882
|
"seventy_five?" => {
|
|
1457
883
|
name: "seventy_five?",
|
|
1458
884
|
description: "returns whether the integer is seventy five.",
|
|
1459
|
-
examples: [
|
|
1460
|
-
"75.seventy_five?",
|
|
1461
|
-
"76.seventy_five?",
|
|
1462
|
-
"0.seventy_five?"
|
|
1463
|
-
]
|
|
885
|
+
examples: %w[75.seventy_five? 76.seventy_five? 0.seventy_five?]
|
|
1464
886
|
},
|
|
1465
887
|
"seventy_six?" => {
|
|
1466
888
|
name: "seventy_six?",
|
|
1467
889
|
description: "returns whether the integer is seventy six.",
|
|
1468
|
-
examples: [
|
|
1469
|
-
"76.seventy_six?",
|
|
1470
|
-
"77.seventy_six?",
|
|
1471
|
-
"0.seventy_six?"
|
|
1472
|
-
]
|
|
890
|
+
examples: %w[76.seventy_six? 77.seventy_six? 0.seventy_six?]
|
|
1473
891
|
},
|
|
1474
892
|
"seventy_seven?" => {
|
|
1475
893
|
name: "seventy_seven?",
|
|
1476
894
|
description: "returns whether the integer is seventy seven.",
|
|
1477
|
-
examples: [
|
|
1478
|
-
"77.seventy_seven?",
|
|
1479
|
-
"78.seventy_seven?",
|
|
1480
|
-
"0.seventy_seven?"
|
|
1481
|
-
]
|
|
895
|
+
examples: %w[77.seventy_seven? 78.seventy_seven? 0.seventy_seven?]
|
|
1482
896
|
},
|
|
1483
897
|
"seventy_eight?" => {
|
|
1484
898
|
name: "seventy_eight?",
|
|
1485
899
|
description: "returns whether the integer is seventy eight.",
|
|
1486
|
-
examples: [
|
|
1487
|
-
"78.seventy_eight?",
|
|
1488
|
-
"79.seventy_eight?",
|
|
1489
|
-
"0.seventy_eight?"
|
|
1490
|
-
]
|
|
900
|
+
examples: %w[78.seventy_eight? 79.seventy_eight? 0.seventy_eight?]
|
|
1491
901
|
},
|
|
1492
902
|
"seventy_nine?" => {
|
|
1493
903
|
name: "seventy_nine?",
|
|
1494
904
|
description: "returns whether the integer is seventy nine.",
|
|
1495
|
-
examples: [
|
|
1496
|
-
"79.seventy_nine?",
|
|
1497
|
-
"80.seventy_nine?",
|
|
1498
|
-
"0.seventy_nine?"
|
|
1499
|
-
]
|
|
905
|
+
examples: %w[79.seventy_nine? 80.seventy_nine? 0.seventy_nine?]
|
|
1500
906
|
},
|
|
1501
907
|
"eighty?" => {
|
|
1502
908
|
name: "eighty?",
|
|
1503
909
|
description: "returns whether the integer is eighty.",
|
|
1504
|
-
examples: [
|
|
1505
|
-
"80.eighty?",
|
|
1506
|
-
"81.eighty?",
|
|
1507
|
-
"0.eighty?"
|
|
1508
|
-
]
|
|
910
|
+
examples: %w[80.eighty? 81.eighty? 0.eighty?]
|
|
1509
911
|
},
|
|
1510
912
|
"eighty_one?" => {
|
|
1511
913
|
name: "eighty_one?",
|
|
1512
914
|
description: "returns whether the integer is eighty one.",
|
|
1513
|
-
examples: [
|
|
1514
|
-
"81.eighty_one?",
|
|
1515
|
-
"82.eighty_one?",
|
|
1516
|
-
"0.eighty_one?"
|
|
1517
|
-
]
|
|
915
|
+
examples: %w[81.eighty_one? 82.eighty_one? 0.eighty_one?]
|
|
1518
916
|
},
|
|
1519
917
|
"eighty_two?" => {
|
|
1520
918
|
name: "eighty_two?",
|
|
1521
919
|
description: "returns whether the integer is eighty two.",
|
|
1522
|
-
examples: [
|
|
1523
|
-
"82.eighty_two?",
|
|
1524
|
-
"83.eighty_two?",
|
|
1525
|
-
"0.eighty_two?"
|
|
1526
|
-
]
|
|
920
|
+
examples: %w[82.eighty_two? 83.eighty_two? 0.eighty_two?]
|
|
1527
921
|
},
|
|
1528
922
|
"eighty_three?" => {
|
|
1529
923
|
name: "eighty_three?",
|
|
1530
924
|
description: "returns whether the integer is eighty three.",
|
|
1531
|
-
examples: [
|
|
1532
|
-
"83.eighty_three?",
|
|
1533
|
-
"84.eighty_three?",
|
|
1534
|
-
"0.eighty_three?"
|
|
1535
|
-
]
|
|
925
|
+
examples: %w[83.eighty_three? 84.eighty_three? 0.eighty_three?]
|
|
1536
926
|
},
|
|
1537
927
|
"eighty_four?" => {
|
|
1538
928
|
name: "eighty_four?",
|
|
1539
929
|
description: "returns whether the integer is eighty four.",
|
|
1540
|
-
examples: [
|
|
1541
|
-
"84.eighty_four?",
|
|
1542
|
-
"85.eighty_four?",
|
|
1543
|
-
"0.eighty_four?"
|
|
1544
|
-
]
|
|
930
|
+
examples: %w[84.eighty_four? 85.eighty_four? 0.eighty_four?]
|
|
1545
931
|
},
|
|
1546
932
|
"eighty_five?" => {
|
|
1547
933
|
name: "eighty_five?",
|
|
1548
934
|
description: "returns whether the integer is eighty five.",
|
|
1549
|
-
examples: [
|
|
1550
|
-
"85.eighty_five?",
|
|
1551
|
-
"86.eighty_five?",
|
|
1552
|
-
"0.eighty_five?"
|
|
1553
|
-
]
|
|
935
|
+
examples: %w[85.eighty_five? 86.eighty_five? 0.eighty_five?]
|
|
1554
936
|
},
|
|
1555
937
|
"eighty_six?" => {
|
|
1556
938
|
name: "eighty_six?",
|
|
1557
939
|
description: "returns whether the integer is eighty six.",
|
|
1558
|
-
examples: [
|
|
1559
|
-
"86.eighty_six?",
|
|
1560
|
-
"87.eighty_six?",
|
|
1561
|
-
"0.eighty_six?"
|
|
1562
|
-
]
|
|
940
|
+
examples: %w[86.eighty_six? 87.eighty_six? 0.eighty_six?]
|
|
1563
941
|
},
|
|
1564
942
|
"eighty_seven?" => {
|
|
1565
943
|
name: "eighty_seven?",
|
|
1566
944
|
description: "returns whether the integer is eighty seven.",
|
|
1567
|
-
examples: [
|
|
1568
|
-
"87.eighty_seven?",
|
|
1569
|
-
"88.eighty_seven?",
|
|
1570
|
-
"0.eighty_seven?"
|
|
1571
|
-
]
|
|
945
|
+
examples: %w[87.eighty_seven? 88.eighty_seven? 0.eighty_seven?]
|
|
1572
946
|
},
|
|
1573
947
|
"eighty_eight?" => {
|
|
1574
948
|
name: "eighty_eight?",
|
|
1575
949
|
description: "returns whether the integer is eighty eight.",
|
|
1576
|
-
examples: [
|
|
1577
|
-
"88.eighty_eight?",
|
|
1578
|
-
"89.eighty_eight?",
|
|
1579
|
-
"0.eighty_eight?"
|
|
1580
|
-
]
|
|
950
|
+
examples: %w[88.eighty_eight? 89.eighty_eight? 0.eighty_eight?]
|
|
1581
951
|
},
|
|
1582
952
|
"eighty_nine?" => {
|
|
1583
953
|
name: "eighty_nine?",
|
|
1584
954
|
description: "returns whether the integer is eighty nine.",
|
|
1585
|
-
examples: [
|
|
1586
|
-
"89.eighty_nine?",
|
|
1587
|
-
"90.eighty_nine?",
|
|
1588
|
-
"0.eighty_nine?"
|
|
1589
|
-
]
|
|
955
|
+
examples: %w[89.eighty_nine? 90.eighty_nine? 0.eighty_nine?]
|
|
1590
956
|
},
|
|
1591
957
|
"ninety?" => {
|
|
1592
958
|
name: "ninety?",
|
|
1593
959
|
description: "returns whether the integer is ninety.",
|
|
1594
|
-
examples: [
|
|
1595
|
-
"90.ninety?",
|
|
1596
|
-
"91.ninety?",
|
|
1597
|
-
"0.ninety?"
|
|
1598
|
-
]
|
|
960
|
+
examples: %w[90.ninety? 91.ninety? 0.ninety?]
|
|
1599
961
|
},
|
|
1600
962
|
"ninety_one?" => {
|
|
1601
963
|
name: "ninety_one?",
|
|
1602
964
|
description: "returns whether the integer is ninety one.",
|
|
1603
|
-
examples: [
|
|
1604
|
-
"91.ninety_one?",
|
|
1605
|
-
"92.ninety_one?",
|
|
1606
|
-
"0.ninety_one?"
|
|
1607
|
-
]
|
|
965
|
+
examples: %w[91.ninety_one? 92.ninety_one? 0.ninety_one?]
|
|
1608
966
|
},
|
|
1609
967
|
"ninety_two?" => {
|
|
1610
968
|
name: "ninety_two?",
|
|
1611
969
|
description: "returns whether the integer is ninety two.",
|
|
1612
|
-
examples: [
|
|
1613
|
-
"92.ninety_two?",
|
|
1614
|
-
"93.ninety_two?",
|
|
1615
|
-
"0.ninety_two?"
|
|
1616
|
-
]
|
|
970
|
+
examples: %w[92.ninety_two? 93.ninety_two? 0.ninety_two?]
|
|
1617
971
|
},
|
|
1618
972
|
"ninety_three?" => {
|
|
1619
973
|
name: "ninety_three?",
|
|
1620
974
|
description: "returns whether the integer is ninety three.",
|
|
1621
|
-
examples: [
|
|
1622
|
-
"93.ninety_three?",
|
|
1623
|
-
"94.ninety_three?",
|
|
1624
|
-
"0.ninety_three?"
|
|
1625
|
-
]
|
|
975
|
+
examples: %w[93.ninety_three? 94.ninety_three? 0.ninety_three?]
|
|
1626
976
|
},
|
|
1627
977
|
"ninety_four?" => {
|
|
1628
978
|
name: "ninety_four?",
|
|
1629
979
|
description: "returns whether the integer is ninety four.",
|
|
1630
|
-
examples: [
|
|
1631
|
-
"94.ninety_four?",
|
|
1632
|
-
"95.ninety_four?",
|
|
1633
|
-
"0.ninety_four?"
|
|
1634
|
-
]
|
|
980
|
+
examples: %w[94.ninety_four? 95.ninety_four? 0.ninety_four?]
|
|
1635
981
|
},
|
|
1636
982
|
"ninety_five?" => {
|
|
1637
983
|
name: "ninety_five?",
|
|
1638
984
|
description: "returns whether the integer is ninety five.",
|
|
1639
|
-
examples: [
|
|
1640
|
-
"95.ninety_five?",
|
|
1641
|
-
"96.ninety_five?",
|
|
1642
|
-
"0.ninety_five?"
|
|
1643
|
-
]
|
|
985
|
+
examples: %w[95.ninety_five? 96.ninety_five? 0.ninety_five?]
|
|
1644
986
|
},
|
|
1645
987
|
"ninety_six?" => {
|
|
1646
988
|
name: "ninety_six?",
|
|
1647
989
|
description: "returns whether the integer is ninety six.",
|
|
1648
|
-
examples: [
|
|
1649
|
-
"96.ninety_six?",
|
|
1650
|
-
"97.ninety_six?",
|
|
1651
|
-
"0.ninety_six?"
|
|
1652
|
-
]
|
|
990
|
+
examples: %w[96.ninety_six? 97.ninety_six? 0.ninety_six?]
|
|
1653
991
|
},
|
|
1654
992
|
"ninety_seven?" => {
|
|
1655
993
|
name: "ninety_seven?",
|
|
1656
994
|
description: "returns whether the integer is ninety seven.",
|
|
1657
|
-
examples: [
|
|
1658
|
-
"97.ninety_seven?",
|
|
1659
|
-
"98.ninety_seven?",
|
|
1660
|
-
"0.ninety_seven?"
|
|
1661
|
-
]
|
|
995
|
+
examples: %w[97.ninety_seven? 98.ninety_seven? 0.ninety_seven?]
|
|
1662
996
|
},
|
|
1663
997
|
"ninety_eight?" => {
|
|
1664
998
|
name: "ninety_eight?",
|
|
1665
999
|
description: "returns whether the integer is ninety eight.",
|
|
1666
|
-
examples: [
|
|
1667
|
-
"98.ninety_eight?",
|
|
1668
|
-
"99.ninety_eight?",
|
|
1669
|
-
"0.ninety_eight?"
|
|
1670
|
-
]
|
|
1000
|
+
examples: %w[98.ninety_eight? 99.ninety_eight? 0.ninety_eight?]
|
|
1671
1001
|
},
|
|
1672
1002
|
"ninety_nine?" => {
|
|
1673
1003
|
name: "ninety_nine?",
|
|
1674
1004
|
description: "returns whether the integer is ninety nine.",
|
|
1675
|
-
examples: [
|
|
1676
|
-
"99.ninety_nine?",
|
|
1677
|
-
"100.ninety_nine?",
|
|
1678
|
-
"0.ninety_nine?"
|
|
1679
|
-
]
|
|
1005
|
+
examples: %w[99.ninety_nine? 100.ninety_nine? 0.ninety_nine?]
|
|
1680
1006
|
},
|
|
1681
1007
|
"one_hundred?" => {
|
|
1682
1008
|
name: "one_hundred?",
|
|
1683
1009
|
description: "returns whether the integer is one hundred.",
|
|
1684
|
-
examples: [
|
|
1685
|
-
"100.one_hundred?",
|
|
1686
|
-
"101.one_hundred?",
|
|
1687
|
-
"0.one_hundred?"
|
|
1688
|
-
]
|
|
1010
|
+
examples: %w[100.one_hundred? 101.one_hundred? 0.one_hundred?]
|
|
1689
1011
|
}
|
|
1690
1012
|
}.freeze
|
|
1691
1013
|
|
|
@@ -2448,14 +1770,17 @@ class Code
|
|
|
2448
1770
|
code_value = value.to_code
|
|
2449
1771
|
code_function = function.to_code
|
|
2450
1772
|
|
|
2451
|
-
raw
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
1773
|
+
raw
|
|
1774
|
+
.downto(code_value.raw)
|
|
1775
|
+
.with_index do |element, index|
|
|
1776
|
+
code_function.call(
|
|
1777
|
+
arguments:
|
|
1778
|
+
List.new([Integer.new(element), Integer.new(index), self]),
|
|
1779
|
+
**globals
|
|
1780
|
+
)
|
|
1781
|
+
rescue Error::Next => e
|
|
1782
|
+
e.code_value
|
|
1783
|
+
end
|
|
2459
1784
|
|
|
2460
1785
|
self
|
|
2461
1786
|
rescue Error::Break => e
|
|
@@ -2466,14 +1791,17 @@ class Code
|
|
|
2466
1791
|
code_value = value.to_code
|
|
2467
1792
|
code_function = function.to_code
|
|
2468
1793
|
|
|
2469
|
-
raw
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
1794
|
+
raw
|
|
1795
|
+
.upto(code_value.raw)
|
|
1796
|
+
.with_index do |element, index|
|
|
1797
|
+
code_function.call(
|
|
1798
|
+
arguments:
|
|
1799
|
+
List.new([Integer.new(element), Integer.new(index), self]),
|
|
1800
|
+
**globals
|
|
1801
|
+
)
|
|
1802
|
+
rescue Error::Next => e
|
|
1803
|
+
e.code_value
|
|
1804
|
+
end
|
|
2477
1805
|
|
|
2478
1806
|
self
|
|
2479
1807
|
rescue Error::Break => e
|