Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"stack level too deep" error with large splatted array parameters #44

Open
saarp opened this issue May 30, 2015 · 0 comments
Open

"stack level too deep" error with large splatted array parameters #44

saarp opened this issue May 30, 2015 · 0 comments

Comments

@saarp
Copy link

saarp commented May 30, 2015

There seems to be a well-know issue with passing too many parameters to a function in Ruby. It's easy to hit this with when using Redis. The Redis client appears to have a way around this by passing a single array type as an argument. I am wondering how i can achieve the same with EM::Hiredis.

require "em-hiredis"

EM::run do
    redis = EM::Hiredis::connect("redis://localhost:6379/5")

    bigRange = (1..1000000)
    p "Starting big sunion."
    redis.sunion(*bigRange)
    # now "stack level too deep" error occurs
    p "Got out alive."
end

REF: redis/redis-rb#122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant