Commit 5bda168
committed
Simplify collect_variant_types and split dense desc call
StackableValues#[] already returns a flat Array, so the Array(...).flatten(1)
wrapping in collect_variant_types was redundant noise. Replace it with a
direct .each and update the comment to match reality.
Add an explicit failure-mode note: if Grape ever renames the private ivars
(@converter, @types, @scope), the method silently returns {} and swagger
degrades to the pre-fix broken output rather than crashing.
Split the three-operation desc(pop_desc(...), params: ..., **...) one-liner
into named locals for readability.1 parent 2457d42 commit 5bda168
2 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
0 commit comments