redis gem test passes in 1.8, fails in Maglev.

44 views
Skip to first unread message

R.T. Lechow

unread,
Feb 26, 2013, 6:49:22 PM2/26/13
to maglev-d...@googlegroups.com
Not sure what's up, any help much appreciated! Pretty good chance I broke everything.

https://gist.github.com/rtlechow/c0f11689676003ab8383

Thanks!

Jamie Macey

unread,
Mar 5, 2013, 12:15:57 PM3/5/13
to maglev-d...@googlegroups.com
On Tuesday, February 26, 2013 3:49:22 PM UTC-8, R.T. Lechow wrote:
Not sure what's up, any help much appreciated! Pretty good chance I broke everything.

https://gist.github.com/rtlechow/c0f11689676003ab8383

I've been digging into this a little bit more.

The problem seems to be in redis-3.0.3/lib/redis/connection.ruby.rb, where #initialize of Redis::Connection::SocketMixin (line 12) isn't being called for the Redis::Connection::TCPSocket (line 113).

I'm not sure where the problem #initialize is that isn't calling super, but the class hierarchy is:

    Redis::Connection::TCPSocket
    Redis::Connection::SocketMixin
    Socket
    Socket::Constants
    BasicSocket
    IO
    Enumerable
    File::Constants
    Object
    Kernel

On a probably unrelated note, I tried working around the lack of #initialize by modifying Redis::Connection::SocketMixin#gets to run @buffer ||= "" at the beginning, but that led me to another error where IO#read_nonblock from ruby core apparently doesn't exist in Maglev.

-- 
Jamie
 
Reply all
Reply to author
Forward
0 new messages