Skip to content

This commit from v0.9.0 broke the usage of redis objects inside transactions #273

@hfsaito

Description

@hfsaito

After following commit: 7c41fb6

This piece of code does not work

redis_sorted_set = Redis::SortedSet.new('test:test:test')
(1..100).each { |i| redis_sorted_set.add(i.to_s, i) }
foo, bar = $redis.multi do
  redis_sorted_set.range(0, 10) # breaks
  redis_sorted_set.remrangebyrank(0, 10)
end

Backtrace

/app/gemfiles/vendor/bundle/ruby/3.3.0/gems/redis-objects-1.7.0/lib/redis/sorted_set.rb:96:in `range': undefined method `map' for an instance of Redis::Future (NoMethodError)

        redis.zrange(key, start_index, end_index).map{|v| unmarshal(v) }
                                                 ^^^^

Anywhere using marshal/unmarshal breaks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions