Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

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

Closed
gf3 opened this issue Mar 26, 2013 · 7 comments · Fixed by #5
Closed

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

gf3 opened this issue Mar 26, 2013 · 7 comments · Fixed by #5

Comments

@gf3
Copy link

gf3 commented Mar 26, 2013

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
Copy link
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
Copy link
Contributor

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
Copy link
Member

tarcieri commented Apr 1, 2013

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

@gf3
Copy link
Author

gf3 commented Apr 2, 2013

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
Copy link
Author

gf3 commented Apr 5, 2013

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

@tarcieri
Copy link
Member

tarcieri commented Apr 7, 2013

Cool, will spin a new gem.

@tarcieri
Copy link
Member

tarcieri commented Apr 7, 2013

This should be fixed in 0.0.2.

@tarcieri tarcieri closed this as completed Apr 7, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants