tbpgr_utils 0.0.150 → 0.0.151

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -9
  3. data/README.md +95 -32
  4. data/lib/attr_enumerable/attr_enumerable_helper.rb +52 -52
  5. data/lib/attr_enumerable/map_attr.rb +1 -1
  6. data/lib/eval_helper/attr_accessor_init_code.rb +3 -3
  7. data/lib/eval_helper/each_do_code.rb +26 -26
  8. data/lib/eval_helper/each_with_index_do_code.rb +26 -26
  9. data/lib/eval_helper/require_code.rb +1 -1
  10. data/lib/eval_helper/require_relative_code.rb +1 -1
  11. data/lib/eval_helper/set_variable_code.rb +1 -1
  12. data/lib/eval_helper/set_variables_code.rb +1 -1
  13. data/lib/eval_helper/times_code.rb +1 -1
  14. data/lib/ghostable.rb +1 -1
  15. data/lib/open_classes/array.rb +0 -2
  16. data/lib/open_classes/array/average.rb +17 -17
  17. data/lib/open_classes/array/gte_gte.rb +1 -1
  18. data/lib/open_classes/array/to_table.rb +1 -1
  19. data/lib/open_classes/array/together_clear.rb +24 -24
  20. data/lib/open_classes/array/together_compact.rb +44 -44
  21. data/lib/open_classes/array/together_empty.rb +1 -1
  22. data/lib/open_classes/array/together_include.rb +1 -1
  23. data/lib/open_classes/enumerable.rb +4 -0
  24. data/lib/open_classes/enumerable/if_else_map.rb +12 -0
  25. data/lib/open_classes/{array → enumerable}/kernel_send.rb +15 -15
  26. data/lib/open_classes/{array → enumerable}/sum.rb +3 -3
  27. data/lib/open_classes/hash/gte_gte.rb +45 -45
  28. data/lib/open_classes/integer/each_digit.rb +13 -13
  29. data/lib/open_classes/integer/each_digit_with_index.rb +13 -13
  30. data/lib/open_classes/integer/reverse_each_digit.rb +13 -13
  31. data/lib/open_classes/kernel/aa_ancestors.rb +1 -1
  32. data/lib/open_classes/numeric/is_ascii.rb +4 -4
  33. data/lib/open_classes/object/any_of.rb +1 -2
  34. data/lib/open_classes/object/to_bool.rb +1 -1
  35. data/lib/open_classes/string/ascii_unicode_html_table.rb +1 -1
  36. data/lib/open_classes/string/ascii_unicode_table.rb +1 -1
  37. data/lib/open_classes/string/is_meta_variable.rb +7 -7
  38. data/lib/open_classes/string/justify_table.rb +2 -2
  39. data/lib/open_classes/string/surround.rb +2 -2
  40. data/lib/open_classes/symbol/is_meta_variable.rb +6 -6
  41. data/lib/tbpgr_utils.rb +1 -0
  42. data/lib/tbpgr_utils/version.rb +1 -1
  43. data/lib/templatable.rb +1 -1
  44. data/rubocop-todo.yml +2 -36
  45. data/spec/attr_enumerable/each_attr_spec.rb +1 -1
  46. data/spec/attr_enumerable/each_attr_with_index_spec.rb +1 -1
  47. data/spec/attr_enumerable/first_attr_spec.rb +107 -107
  48. data/spec/attr_enumerable/include_attr_spec.rb +4 -4
  49. data/spec/attr_enumerable/last_attr_spec.rb +4 -4
  50. data/spec/attr_enumerable/map_attr_spec.rb +3 -3
  51. data/spec/attr_enumerable/reduce_attr_spec.rb +3 -3
  52. data/spec/attr_enumerable/reverse_attr_spec.rb +1 -1
  53. data/spec/attr_enumerable/sample_attr_spec.rb +3 -3
  54. data/spec/attr_enumerable/select_attr_spec.rb +2 -2
  55. data/spec/attr_enumerable/shuffle_attr_spec.rb +1 -1
  56. data/spec/attr_enumerable/slice_attr_spec.rb +1 -1
  57. data/spec/attributes_hashable_spec.rb +1 -1
  58. data/spec/attributes_initializable_spec.rb +21 -21
  59. data/spec/eval_helper/attr_accessor_init_code_spec.rb +1 -1
  60. data/spec/eval_helper/attr_init_class_code_spec.rb +1 -1
  61. data/spec/eval_helper/each_brace_code_spec.rb +2 -2
  62. data/spec/eval_helper/each_do_code_spec.rb +1 -1
  63. data/spec/eval_helper/each_with_index_brace_code_spec.rb +2 -2
  64. data/spec/eval_helper/each_with_index_do_code_spec.rb +2 -2
  65. data/spec/eval_helper/if_code_after_spec.rb +3 -3
  66. data/spec/eval_helper/if_code_spec.rb +3 -3
  67. data/spec/eval_helper/require_code_spec.rb +3 -3
  68. data/spec/eval_helper/require_relative_code_spec.rb +3 -3
  69. data/spec/eval_helper/set_variable_code_spec.rb +3 -3
  70. data/spec/{set_variables_code_spec.rb → eval_helper/set_variables_code_spec.rb} +15 -15
  71. data/spec/eval_helper/ternary_operator_spec.rb +5 -5
  72. data/spec/eval_helper/times_code_spec.rb +1 -1
  73. data/spec/eval_helper/unless_code_after_spec.rb +3 -3
  74. data/spec/eval_helper/unless_code_spec.rb +3 -3
  75. data/spec/familyable/familyable_spec.rb +6 -6
  76. data/spec/ghostable_spec.rb +5 -5
  77. data/spec/markdown/backquotes_spec.rb +4 -4
  78. data/spec/markdown/bold_spec.rb +4 -4
  79. data/spec/markdown/code_spec.rb +3 -3
  80. data/spec/markdown/codes_spec.rb +2 -2
  81. data/spec/markdown/heading_spec.rb +5 -5
  82. data/spec/markdown/hr_spec.rb +1 -1
  83. data/spec/markdown/italic_spec.rb +4 -4
  84. data/spec/markdown/link_spec.rb +1 -1
  85. data/spec/markdown/ol_spec.rb +3 -3
  86. data/spec/markdown/ul_spec.rb +3 -3
  87. data/spec/metasyntactic_variable_spec.rb +4 -4
  88. data/spec/open_classes/array/average_spec.rb +4 -4
  89. data/spec/open_classes/array/exchange_spec.rb +6 -6
  90. data/spec/open_classes/array/gte_gte_spec.rb +4 -4
  91. data/spec/open_classes/array/to_html_table_spec.rb +3 -3
  92. data/spec/open_classes/array/to_table_spec.rb +2 -2
  93. data/spec/open_classes/array/together_at_spec.rb +4 -4
  94. data/spec/open_classes/array/together_clear_spec.rb +3 -3
  95. data/spec/open_classes/array/together_compact_spec.rb +6 -6
  96. data/spec/open_classes/array/together_concat_spec.rb +3 -3
  97. data/spec/open_classes/array/together_delete_at_spec.rb +5 -5
  98. data/spec/open_classes/array/together_delete_if_spec.rb +4 -4
  99. data/spec/open_classes/array/together_delete_spec.rb +5 -5
  100. data/spec/open_classes/array/together_empty_spec.rb +4 -4
  101. data/spec/open_classes/array/together_fill_spec.rb +5 -5
  102. data/spec/open_classes/array/together_first_spec.rb +6 -6
  103. data/spec/open_classes/array/together_include_spec.rb +8 -8
  104. data/spec/open_classes/array/together_index_spec.rb +5 -5
  105. data/spec/open_classes/array/together_insert_spec.rb +5 -5
  106. data/spec/open_classes/array/together_last_spec.rb +6 -6
  107. data/spec/open_classes/array/together_map_spec.rb +14 -14
  108. data/spec/open_classes/array/together_pop_spec.rb +8 -8
  109. data/spec/open_classes/array/together_reduce_spec.rb +8 -8
  110. data/spec/open_classes/array/together_reverse_spec.rb +119 -119
  111. data/spec/open_classes/array/together_sample_spec.rb +8 -8
  112. data/spec/open_classes/array/together_select_spec.rb +6 -6
  113. data/spec/open_classes/array/together_shift_spec.rb +8 -8
  114. data/spec/open_classes/array/together_shuffle_spec.rb +3 -3
  115. data/spec/open_classes/array/together_slice_spec.rb +5 -5
  116. data/spec/open_classes/array/together_spec.rb +3 -3
  117. data/spec/open_classes/array/together_with_index_spec.rb +3 -3
  118. data/spec/open_classes/array/uniq_size_spec.rb +4 -4
  119. data/spec/open_classes/enumerable/if_else_map_spec.rb +45 -0
  120. data/spec/open_classes/{array → enumerable}/kernel_send_spec.rb +50 -43
  121. data/spec/open_classes/{array → enumerable}/sum_spec.rb +8 -2
  122. data/spec/open_classes/fixnum/to_fixnum_html_table_spec.rb +1 -1
  123. data/spec/open_classes/fixnum/to_fixnum_table_spec.rb +1 -1
  124. data/spec/open_classes/hash/gte_gte_spec.rb +4 -4
  125. data/spec/open_classes/hash/html_table_spec.rb +2 -2
  126. data/spec/open_classes/hash/table_spec.rb +2 -2
  127. data/spec/open_classes/integer/each_digit_spec.rb +2 -2
  128. data/spec/open_classes/integer/each_digit_with_index_spec.rb +2 -2
  129. data/spec/open_classes/integer/palindromic_prime_spec.rb +6 -6
  130. data/spec/open_classes/integer/reverse_each_digit_spec.rb +2 -2
  131. data/spec/open_classes/kernel/aa_ancestors_spec.rb +1 -1
  132. data/spec/open_classes/kernel/booleans_spec.rb +1 -1
  133. data/spec/open_classes/kernel/bulk_define_methods_spec.rb +5 -5
  134. data/spec/open_classes/kernel/bulk_puts_eval_spec.rb +1 -1
  135. data/spec/open_classes/kernel/evalb_spec.rb +2 -2
  136. data/spec/open_classes/kernel/exchange_spec.rb +2 -2
  137. data/spec/open_classes/kernel/hash_to_attributes_spec.rb +3 -3
  138. data/spec/open_classes/kernel/null_spec.rb +1 -1
  139. data/spec/open_classes/kernel/print_eval_spec.rb +3 -3
  140. data/spec/open_classes/kernel/puts_eval_spec.rb +3 -3
  141. data/spec/open_classes/module_spec.rb +3 -3
  142. data/spec/open_classes/numeric/dice_back_spec.rb +8 -8
  143. data/spec/open_classes/numeric/dozen_spec.rb +4 -4
  144. data/spec/open_classes/numeric/is_ascii_spec.rb +6 -6
  145. data/spec/open_classes/numeric/to_binary_html_table_spec.rb +1 -1
  146. data/spec/open_classes/numeric/to_binary_table_spec.rb +1 -1
  147. data/spec/open_classes/numeric/to_digit_html_table_spec.rb +1 -1
  148. data/spec/open_classes/numeric/to_digit_table_spec.rb +1 -1
  149. data/spec/open_classes/numeric/to_hex_html_table_spec.rb +1 -1
  150. data/spec/open_classes/numeric/to_hex_table_spec.rb +1 -1
  151. data/spec/open_classes/numeric/to_oct_html_table_spec.rb +1 -1
  152. data/spec/open_classes/numeric/to_oct_table_spec.rb +1 -1
  153. data/spec/open_classes/object/any_of_spec.rb +6 -6
  154. data/spec/open_classes/object/boolean_spec.rb +6 -6
  155. data/spec/open_classes/object/grep_instance_method_spec.rb +15 -15
  156. data/spec/open_classes/object/grep_method_spec.rb +6 -6
  157. data/spec/open_classes/object/guard_spec.rb +8 -8
  158. data/spec/open_classes/object/method_nameable_spec.rb +4 -4
  159. data/spec/open_classes/object/my_methods_spec.rb +2 -2
  160. data/spec/open_classes/object/null_spec.rb +1 -1
  161. data/spec/open_classes/object/to_bool_spec.rb +7 -7
  162. data/spec/open_classes/string/ascii1_other2_size_spec.rb +5 -5
  163. data/spec/open_classes/string/ascii_unicode_html_table_spec.rb +1 -1
  164. data/spec/open_classes/string/ascii_unicode_table_spec.rb +1 -1
  165. data/spec/open_classes/string/comma_to_a_spec.rb +1 -1
  166. data/spec/open_classes/string/cygwinpath_to_winpath_spec.rb +3 -3
  167. data/spec/open_classes/string/escape_double_quote_spec.rb +3 -3
  168. data/spec/open_classes/string/escape_quote_spec.rb +3 -3
  169. data/spec/open_classes/string/gte_gte_spec.rb +3 -3
  170. data/spec/open_classes/string/hyphen_to_a_spec.rb +1 -1
  171. data/spec/open_classes/string/is_meta_variable_spec.rb +3 -3
  172. data/spec/open_classes/string/justify_char_spec.rb +6 -6
  173. data/spec/open_classes/string/justify_table_spec.rb +6 -6
  174. data/spec/open_classes/string/say_spec.rb +2 -2
  175. data/spec/open_classes/string/spacing_spec.rb +6 -6
  176. data/spec/open_classes/string/surround_spec.rb +1 -1
  177. data/spec/open_classes/string/table_to_array_spec.rb +1 -1
  178. data/spec/open_classes/string/to_hatena_heading_spec.rb +5 -5
  179. data/spec/open_classes/string/to_markdown_heading_spec.rb +5 -5
  180. data/spec/open_classes/string/to_space2_heading_spec.rb +5 -5
  181. data/spec/open_classes/string/to_space4_heading_spec.rb +5 -5
  182. data/spec/open_classes/string/to_tab_heading_spec.rb +5 -5
  183. data/spec/open_classes/string/unescape_double_quote_spec.rb +3 -3
  184. data/spec/open_classes/string/unescape_quote_spec.rb +3 -3
  185. data/spec/open_classes/string/uniq_size_spec.rb +4 -4
  186. data/spec/open_classes/string/uniq_spec.rb +4 -4
  187. data/spec/open_classes/string/winpath_to_cygwinpath_spec.rb +3 -3
  188. data/spec/open_classes/symbol/is_meta_variable_spec.rb +3 -3
  189. data/spec/simple_tournament_spec.rb +9 -9
  190. data/spec/templatable_spec.rb +2 -2
  191. data/spec/template_methodable_spec.rb +1 -1
  192. data/spec/test_toolbox/kernel_spec.rb +7 -7
  193. data/tbpgr_utils.gemspec +4 -4
  194. metadata +15 -11
@@ -11,7 +11,7 @@ describe Array do
11
11
  inputs: [[*1..5], [*6..10]],
12
12
  method_name: :together_first,
13
13
  expected: [1, 6],
14
- has_args: false,
14
+ has_args: false
15
15
  },
16
16
  {
17
17
  case_no: 2,
@@ -20,7 +20,7 @@ describe Array do
20
20
  args: 2,
21
21
  method_name: :together_first,
22
22
  expected: [[1, 2], [6, 7]],
23
- has_args: true,
23
+ has_args: true
24
24
  },
25
25
  {
26
26
  case_no: 3,
@@ -29,7 +29,7 @@ describe Array do
29
29
  args: 0,
30
30
  method_name: :together_first,
31
31
  expected: [[], []],
32
- has_args: true,
32
+ has_args: true
33
33
  },
34
34
  {
35
35
  case_no: 4,
@@ -38,7 +38,7 @@ describe Array do
38
38
  args: 6,
39
39
  method_name: :together_first,
40
40
  expected: [[*1..5], [*6..10]],
41
- has_args: true,
41
+ has_args: true
42
42
  },
43
43
  {
44
44
  case_no: 5,
@@ -46,8 +46,8 @@ describe Array do
46
46
  inputs: [[*1..5], [*6..10]],
47
47
  method_name: :tfirst,
48
48
  expected: [1, 6],
49
- has_args: false,
50
- },
49
+ has_args: false
50
+ }
51
51
  ]
52
52
 
53
53
  cases.each do |c|
@@ -12,7 +12,7 @@ describe Array do
12
12
  value: 5,
13
13
  method_name: :together_include?,
14
14
  expected: true,
15
- is_multi: false,
15
+ is_multi: false
16
16
  },
17
17
  {
18
18
  case_no: 2,
@@ -21,7 +21,7 @@ describe Array do
21
21
  value: 9,
22
22
  method_name: :together_include?,
23
23
  expected: true,
24
- is_multi: false,
24
+ is_multi: false
25
25
  },
26
26
  {
27
27
  case_no: 3,
@@ -30,7 +30,7 @@ describe Array do
30
30
  value: 10,
31
31
  method_name: :together_include?,
32
32
  expected: false,
33
- is_multi: false,
33
+ is_multi: false
34
34
  },
35
35
  {
36
36
  case_no: 4,
@@ -39,7 +39,7 @@ describe Array do
39
39
  value: 5,
40
40
  method_name: :together_include?,
41
41
  expected: [true, true],
42
- is_multi: true,
42
+ is_multi: true
43
43
  },
44
44
  {
45
45
  case_no: 5,
@@ -48,7 +48,7 @@ describe Array do
48
48
  value: 9,
49
49
  method_name: :together_include?,
50
50
  expected: [false, true],
51
- is_multi: true,
51
+ is_multi: true
52
52
  },
53
53
  {
54
54
  case_no: 6,
@@ -57,7 +57,7 @@ describe Array do
57
57
  value: 10,
58
58
  method_name: :together_include?,
59
59
  expected: [false, false],
60
- is_multi: true,
60
+ is_multi: true
61
61
  },
62
62
  {
63
63
  case_no: 7,
@@ -66,8 +66,8 @@ describe Array do
66
66
  value: 5,
67
67
  method_name: :tinclude?,
68
68
  expected: true,
69
- is_multi: false,
70
- },
69
+ is_multi: false
70
+ }
71
71
  ]
72
72
 
73
73
  cases.each do |c|
@@ -11,7 +11,7 @@ describe Array do
11
11
  inputs: [[*1..5], [*5..9]],
12
12
  value: 5,
13
13
  method_name: :together_index,
14
- expected: [4, 0],
14
+ expected: [4, 0]
15
15
  },
16
16
  {
17
17
  case_no: 2,
@@ -19,7 +19,7 @@ describe Array do
19
19
  inputs: [[*1..5], [*5..9]],
20
20
  value: 4,
21
21
  method_name: :together_index,
22
- expected: [3, nil],
22
+ expected: [3, nil]
23
23
  },
24
24
  {
25
25
  case_no: 3,
@@ -27,7 +27,7 @@ describe Array do
27
27
  inputs: [[*1..5], [*5..9]],
28
28
  value: 10,
29
29
  method_name: :together_index,
30
- expected: [nil, nil],
30
+ expected: [nil, nil]
31
31
  },
32
32
  {
33
33
  case_no: 4,
@@ -35,8 +35,8 @@ describe Array do
35
35
  inputs: [[*1..5], [*5..9]],
36
36
  value: 5,
37
37
  method_name: :tindex,
38
- expected: [4, 0],
39
- },
38
+ expected: [4, 0]
39
+ }
40
40
  ]
41
41
 
42
42
  cases.each do |c|
@@ -10,29 +10,29 @@ describe Array do
10
10
  case_title: 'both insert exist case',
11
11
  inputs: [[*1..5], [*5..9]],
12
12
  exec_code: 'together_insert(1, 55, 66)',
13
- expected: [[1, 55, 66, 2, 3, 4, 5], [5, 55, 66, 6, 7, 8, 9]],
13
+ expected: [[1, 55, 66, 2, 3, 4, 5], [5, 55, 66, 6, 7, 8, 9]]
14
14
  },
15
15
  {
16
16
  case_no: 2,
17
17
  case_title: 'both insert exist and minus index case',
18
18
  inputs: [[*1..5], [*5..9]],
19
19
  exec_code: 'together_insert(-2, 55, 66)',
20
- expected: [[1, 2, 3, 4, 55, 66, 5], [5, 6, 7, 8, 55, 66, 9]],
20
+ expected: [[1, 2, 3, 4, 55, 66, 5], [5, 6, 7, 8, 55, 66, 9]]
21
21
  },
22
22
  {
23
23
  case_no: 3,
24
24
  case_title: 'both insert exist and over index case',
25
25
  inputs: [[*1..5], [*5..9]],
26
26
  exec_code: 'together_insert(6, 55, 66)',
27
- expected: [[1, 2, 3, 4, 5, nil, 55, 66], [5, 6, 7, 8, 9, nil, 55, 66]],
27
+ expected: [[1, 2, 3, 4, 5, nil, 55, 66], [5, 6, 7, 8, 9, nil, 55, 66]]
28
28
  },
29
29
  {
30
30
  case_no: 4,
31
31
  case_title: 'both insert exist case(alias tinsert)',
32
32
  inputs: [[*1..5], [*5..9]],
33
33
  exec_code: 'tinsert(1, 55, 66)',
34
- expected: [[1, 55, 66, 2, 3, 4, 5], [5, 55, 66, 6, 7, 8, 9]],
35
- },
34
+ expected: [[1, 55, 66, 2, 3, 4, 5], [5, 55, 66, 6, 7, 8, 9]]
35
+ }
36
36
  ]
37
37
 
38
38
  cases.each do |c|
@@ -11,7 +11,7 @@ describe Array do
11
11
  inputs: [[*1..5], [*6..10]],
12
12
  method_name: :together_last,
13
13
  expected: [5, 10],
14
- has_args: false,
14
+ has_args: false
15
15
  },
16
16
  {
17
17
  case_no: 2,
@@ -20,7 +20,7 @@ describe Array do
20
20
  args: 2,
21
21
  method_name: :together_last,
22
22
  expected: [[4, 5], [9, 10]],
23
- has_args: true,
23
+ has_args: true
24
24
  },
25
25
  {
26
26
  case_no: 3,
@@ -29,7 +29,7 @@ describe Array do
29
29
  args: 0,
30
30
  method_name: :together_last,
31
31
  expected: [[], []],
32
- has_args: true,
32
+ has_args: true
33
33
  },
34
34
  {
35
35
  case_no: 4,
@@ -38,7 +38,7 @@ describe Array do
38
38
  args: 6,
39
39
  method_name: :together_last,
40
40
  expected: [[*1..5], [*6..10]],
41
- has_args: true,
41
+ has_args: true
42
42
  },
43
43
  {
44
44
  case_no: 5,
@@ -46,8 +46,8 @@ describe Array do
46
46
  inputs: [[*1..5], [*6..10]],
47
47
  method_name: :tlast,
48
48
  expected: [5, 10],
49
- has_args: false,
50
- },
49
+ has_args: false
50
+ }
51
51
  ]
52
52
 
53
53
  cases.each do |c|
@@ -10,14 +10,14 @@ describe Array do
10
10
  case_title: 'valid case',
11
11
  method_name: :together_map,
12
12
  inputs: [[1, 2, 3], %w(one two three)],
13
- expected: ['1:one', '2:two', '3:three'],
13
+ expected: ['1:one', '2:two', '3:three']
14
14
  },
15
15
  {
16
16
  case_no: 2,
17
17
  case_title: 'contain nil case',
18
18
  method_name: :together_map,
19
19
  inputs: [[1, 2, 3], %w(one two)],
20
- expected: ['1:one', '2:two', '3:'],
20
+ expected: ['1:one', '2:two', '3:']
21
21
  },
22
22
  {
23
23
  case_no: 3,
@@ -25,29 +25,29 @@ describe Array do
25
25
  method_name: :together_map,
26
26
  inputs: [[1, 2, 3], %w(one two three)],
27
27
  expected: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
28
- is_multi: true,
28
+ is_multi: true
29
29
  },
30
30
  {
31
31
  case_no: 4,
32
32
  case_title: 'valid case(alias together_collect)',
33
33
  method_name: :together_collect,
34
34
  inputs: [[1, 2, 3], %w(one two three)],
35
- expected: ['1:one', '2:two', '3:three'],
35
+ expected: ['1:one', '2:two', '3:three']
36
36
  },
37
37
  {
38
38
  case_no: 5,
39
39
  case_title: 'valid case(alias tmap)',
40
40
  method_name: :tmap,
41
41
  inputs: [[1, 2, 3], %w(one two three)],
42
- expected: ['1:one', '2:two', '3:three'],
42
+ expected: ['1:one', '2:two', '3:three']
43
43
  },
44
44
  {
45
45
  case_no: 6,
46
46
  case_title: 'valid case(alias tcollect)',
47
47
  method_name: :tcollect,
48
48
  inputs: [[1, 2, 3], %w(one two three)],
49
- expected: ['1:one', '2:two', '3:three'],
50
- },
49
+ expected: ['1:one', '2:two', '3:three']
50
+ }
51
51
  ]
52
52
 
53
53
  cases.each do |c|
@@ -89,7 +89,7 @@ describe Array do
89
89
  method_name: :together_map!,
90
90
  inputs: [[1, 2, 3], %w(one two three)],
91
91
  expected_ret: ['1:one', '2:two', '3:three'],
92
- expected_self: ['1:one', '2:two', '3:three'],
92
+ expected_self: ['1:one', '2:two', '3:three']
93
93
  },
94
94
  {
95
95
  case_no: 2,
@@ -97,7 +97,7 @@ describe Array do
97
97
  method_name: :together_map!,
98
98
  inputs: [[1, 2, 3], %w(one two)],
99
99
  expected_ret: ['1:one', '2:two', '3:'],
100
- expected_self: ['1:one', '2:two', '3:'],
100
+ expected_self: ['1:one', '2:two', '3:']
101
101
  },
102
102
  {
103
103
  case_no: 3,
@@ -106,7 +106,7 @@ describe Array do
106
106
  inputs: [[1, 2, 3], %w(one two three)],
107
107
  expected_ret: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
108
108
  expected_self: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
109
- is_multi: true,
109
+ is_multi: true
110
110
  },
111
111
  {
112
112
  case_no: 4,
@@ -115,7 +115,7 @@ describe Array do
115
115
  inputs: [[1, 2, 3], %w(one two three)],
116
116
  expected_ret: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
117
117
  expected_self: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
118
- is_multi: true,
118
+ is_multi: true
119
119
  },
120
120
  {
121
121
  case_no: 5,
@@ -124,7 +124,7 @@ describe Array do
124
124
  inputs: [[1, 2, 3], %w(one two three)],
125
125
  expected_ret: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
126
126
  expected_self: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
127
- is_multi: true,
127
+ is_multi: true
128
128
  },
129
129
  {
130
130
  case_no: 6,
@@ -133,8 +133,8 @@ describe Array do
133
133
  inputs: [[1, 2, 3], %w(one two three)],
134
134
  expected_ret: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
135
135
  expected_self: [['1:one', '2:two', '3:three'], ['one:1', 'two:2', 'three:3']],
136
- is_multi: true,
137
- },
136
+ is_multi: true
137
+ }
138
138
  ]
139
139
 
140
140
  cases.each do |c|
@@ -11,7 +11,7 @@ describe Array do
11
11
  inputs: [[1, 2], [5, 6]],
12
12
  method_name: 'together_pop',
13
13
  expected_ret: [2, 6],
14
- expected_self: [[1], [5]],
14
+ expected_self: [[1], [5]]
15
15
  },
16
16
  {
17
17
  case_no: 2,
@@ -19,7 +19,7 @@ describe Array do
19
19
  inputs: [[1, 2], []],
20
20
  method_name: 'together_pop',
21
21
  expected_ret: [2, nil],
22
- expected_self: [[1], []],
22
+ expected_self: [[1], []]
23
23
  },
24
24
  {
25
25
  case_no: 3,
@@ -27,7 +27,7 @@ describe Array do
27
27
  inputs: [[], []],
28
28
  method_name: 'together_pop',
29
29
  expected_ret: [nil, nil],
30
- expected_self: [[], []],
30
+ expected_self: [[], []]
31
31
  },
32
32
  {
33
33
  case_no: 4,
@@ -37,7 +37,7 @@ describe Array do
37
37
  args: 2,
38
38
  expected_ret: [[1, 2], [5, 6]],
39
39
  expected_self: [[], []],
40
- has_args: true,
40
+ has_args: true
41
41
  },
42
42
  {
43
43
  case_no: 5,
@@ -47,7 +47,7 @@ describe Array do
47
47
  args: 2,
48
48
  expected_ret: [[1, 2], []],
49
49
  expected_self: [[], []],
50
- has_args: true,
50
+ has_args: true
51
51
  },
52
52
  {
53
53
  case_no: 6,
@@ -57,7 +57,7 @@ describe Array do
57
57
  args: 2,
58
58
  expected_ret: [[], []],
59
59
  expected_self: [[], []],
60
- has_args: true,
60
+ has_args: true
61
61
  },
62
62
  {
63
63
  case_no: 7,
@@ -65,8 +65,8 @@ describe Array do
65
65
  inputs: [[1, 2], [5, 6]],
66
66
  method_name: 'tpop',
67
67
  expected_ret: [2, 6],
68
- expected_self: [[1], [5]],
69
- },
68
+ expected_self: [[1], [5]]
69
+ }
70
70
  ]
71
71
 
72
72
  cases.each do |c|
@@ -12,7 +12,7 @@ describe Array do
12
12
  init: nil,
13
13
  logic: 'memo + first + second',
14
14
  method_name: :together_reduce,
15
- expected: 20,
15
+ expected: 20
16
16
  },
17
17
  {
18
18
  case_no: 2,
@@ -21,7 +21,7 @@ describe Array do
21
21
  init: 10,
22
22
  logic: 'memo + first + second',
23
23
  method_name: :together_reduce,
24
- expected: 30,
24
+ expected: 30
25
25
  },
26
26
  {
27
27
  case_no: 5,
@@ -29,7 +29,7 @@ describe Array do
29
29
  inputs: [[1, 2, 3, 4], [4, 2, 3, 1]],
30
30
  logic: 'memo + first + second',
31
31
  expected: 20,
32
- method_name: :treduce,
32
+ method_name: :treduce
33
33
  },
34
34
  {
35
35
  case_no: 6,
@@ -37,7 +37,7 @@ describe Array do
37
37
  inputs: [[1, 2, 3, 4], [4, 2, 3, 1]],
38
38
  logic: 'memo + first + second',
39
39
  expected: 20,
40
- method_name: :together_inject,
40
+ method_name: :together_inject
41
41
  },
42
42
  {
43
43
  case_no: 7,
@@ -45,7 +45,7 @@ describe Array do
45
45
  inputs: [[1, 2, 3, 4], [4, 2, 3, 1]],
46
46
  logic: 'memo + first + second',
47
47
  expected: 20,
48
- method_name: :tinject,
48
+ method_name: :tinject
49
49
  },
50
50
  {
51
51
  case_no: 8,
@@ -54,7 +54,7 @@ describe Array do
54
54
  init: [],
55
55
  logic: 'memo << first + second',
56
56
  method_name: :together_reduce,
57
- expected: [5, 4, 6, 5],
57
+ expected: [5, 4, 6, 5]
58
58
  },
59
59
  {
60
60
  case_no: 9,
@@ -63,8 +63,8 @@ describe Array do
63
63
  init: {},
64
64
  logic: 'memo[first] = second; memo',
65
65
  method_name: :together_reduce,
66
- expected: { 1 => 4, 2 => 2, 3 => 3, 4 => 1 },
67
- },
66
+ expected: { 1 => 4, 2 => 2, 3 => 3, 4 => 1 }
67
+ }
68
68
  ]
69
69
 
70
70
  cases.each do |c|