When fiddling with redis gem I found #multi and #pipelined methods, which allow grouping operations, whose results are later returned as an array.
getresult, delresult = redis.multi do
redis.get key
redis.del key
end
I’d like to store getresult, and omit delresult. In Lua typical practice is to use _ as variable name for dropped values. Is there similar idiom in ruby?
It’s exactly the same. You use
_for ignored variables.