Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

issue in version 0.6.0 #1

Closed
vargolo opened this Issue · 2 comments

3 participants

@vargolo
Collaborator

as I said before, here is the bug

using ipaddress version 0.6.0

001:0> require 'ipaddress'
==> true

002:0> ip = IPAddress '192.168.1.101/255.255.255.248'
==> #

003:0> ip.first.to_s
NoMethodError: undefined method to_u32' for 29:IPAddress::Prefix
from /usr/lib/ruby/gems/1.9.1/gems/ipaddress-0.6.0/lib/ipaddress/ipv4.rb:510:in
network_u32'
from /usr/lib/ruby/gems/1.9.1/gems/ipaddress-0.6.0/lib/ipaddress/ipv4.rb:356:in `first'
from (irb):3

from /usr/bin/irb:12:in `'

while if I use /29 as subnet mask prefix, it works fine

=> ip = IPAddress '192.168.1.101/29'

=> ip.first.to_s

 #=> "192.168.1.97"
@bluemonk
Owner

Right class called from Prefix32::parse_netmask (closed by c1311ad)

@gnufied

I am running 0.7.0 and I still get:

undefined method `to_u32' for #
vendor/bundle/ruby/1.8/gems/ipaddress-0.7.0/lib/ipaddress/ipv4.rb:537:in `include?'
app/models/school.rb:175:in `check_ip_with_range'
This issue was closed.
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.