I accidentally wrote pluck(&:id)
instead of pluck(:id)
and I got some unusual results and I'm curious what is actually happening. What came back looks like an array of all the values (no keys) from the object I was pluck
ing from.
The results looked like this:
=> [[5874, "Vancouver", Wed, 01 Mar 2023, Wed, 01 Mar 2023, nil, nil, nil, nil, nil, nil, nil, nil, true, false, false, 212388, 212388, nil, false, nil, false, nil, false, "Vancouver, BC", true, false, "23VBCCIOIC5874", false, nil, nil]]
I then noticed that I could put anything after the &
and it didn't matter. Such as pluck(&:ham_sandwich)
would give the same results.