"SystemStackError: stack level too deep" when comparing two IPAddress objects #13

Closed
ibc opened this Issue Apr 26, 2011 · 2 comments

Comments

Projects
None yet
3 participants

ibc commented Apr 26, 2011

Tested under Ruby 1.9.2p0 and Ruby 1.9.2p136:

require "ipaddress"
IPAddress("1080:0000:0000:0000:0008:0800:200C:417A") == IPAddress("1080::8:800:200C:417A")

produces:

stack level too deep (SystemStackError)

It doesn't fail under Ruby 1.8.7, neither under Ruby 1.9.1p376. Maybe it's a bug in Ruby 1.9.2.

Collaborator

bluemonk commented Apr 29, 2011

Strange behavior between 1.9.2 and the other releases. However it returns the wrong result even with 1.8.7 and 1.9.1, and it's because IPAddress::IPv6 class doesn't have a <=> method yet.
I will write one in the next release.
Incidentally, you made me discover a bug in IPv4#<=> as well.

Thanks very much.
Marco

pvdb commented May 3, 2011

For other people's benefit: bluemonk#15 highlights a similar/related issue...

bluemonk wrote:

I will include IPv6#<=> and IPv6#each in the next release.

bluemonk closed this in c2945c5 May 13, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment