Skip to content

Loading…

NoMethodError: undefined method `slice!' for nil:NilClass #4

Closed
gf3 opened this Issue · 7 comments

3 participants

@gf3

Seeing this come up occasionally in my logs.

I've gist'd the full stack trace and the method from closest ancestor of my code. It looks like Celluloid might need to do a nil check in Redis::Connection::Celluloid#read—I'm not entirely familiar with what's expected from redis, though.

@tarcieri
Celluloid member

Seems kind of odd: the core Ruby TCPSocket#gets method seems to have the same semantics as far as returning nil on close.

Perhaps I should look elsewhere in the Redis driver for how this is handled

@simonrobson

Looks like the redis-rb ruby driver actually swaps in its own implementation of gets in Redis::Connection::SocketMixin. As far as I can see it changes the semantics ofTCPSocket#gets to never return nil, instead raising Errno::ECONNRESET on end of file.

I recall seeing errors like that @gf3 describes when running the redis-rb test suite on jruby against my own attempt a celluloid driver recently. Will try to reproduce and get a patch in.

@tarcieri
Celluloid member

@gf3 can you confirm this is fixed by #5? If so I can spin a new gem

@gf3
gf3 commented

Sure, I can give it a shot. Might take some time to show up in the logs as I'm not sure what triggered it.

@gf3
gf3 commented

It seems to be resolved. I haven't seen the error in a few days.

@tarcieri
Celluloid member

Cool, will spin a new gem.

@tarcieri
Celluloid member

This should be fixed in 0.0.2.

@tarcieri tarcieri closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.