summaryrefslogtreecommitdiff
path: root/test/test_ipaddr.rb
AgeCommit message (Collapse)Author
26 hours[ruby/ipaddr] Add IPAddr.cidr to return ip address in cidr notationBen Fritsch
https://github.com/ruby/ipaddr/commit/f5b006741f
9 days[ruby/ipaddr] Added IPAddr#wildcard_maskTaketo Takashima
https://github.com/ruby/ipaddr/commit/2093cebc1d
2023-12-25[ruby/ipaddr] Consider IPv4-mapped IPv6 addresses link local/loopback if ↵Earlopain
IPV4 address is private Same as #57 https://github.com/ruby/ipaddr/commit/d56acecb80
2023-12-25[ruby/ipaddr] ntop: Measure address size in bytesKasumi Hanazuki
`IPAddr.ntop` takes the binary representation of an IP address, whose length should be 4 or 16 *bytes* (not characters/codepoints). The current implementation accepts strings in any encoding, but for some values in non-BINARY encoding, it fails proper length check and raises an `AddressFamilyError`. Since passing strings in a multibyte encoding has never worked correctly for years, this patch makes it an explicit error with an `InvalidAddressError`. Fixes: https://github.com/ruby/ipaddr/issues/56 https://github.com/ruby/ipaddr/commit/a33fd14d4a
2023-06-22[ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is ↵Jeremy Evans
private Fixes [Bug #19479] https://github.com/ruby/ipaddr/commit/7faa0768d3
2022-02-10[ruby/ipaddr] Fix exception calling `to_range' after `freeze'Espartaco Palma
https://github.com/ruby/ipaddr/commit/77fe1fca0a
2022-02-10[ruby/ipaddr] Ipaddr#native must also coerce `@mask_addr`Jean Boussier
Before it would be left as an IPv6 mask causing `to_range` to fail. ``` >> IPAddr.new("::2").native.to_range /opt/rubies/3.0.3/lib/ruby/3.0.0/ipaddr.rb:479:in `set': invalid address (IPAddr::InvalidAddressError) ``` https://github.com/ruby/ipaddr/commit/af485192f3
2021-10-11[ruby/ipaddr] Make IPAddr#include? consider range of argumentJeremy Evans
It would be nice to use Range#cover? here, but it doesn't work correctly before Ruby 2.6. Switch to manual checks of the beginning of end of the ranges. Fixes Ruby Bug 14119 https://github.com/ruby/ipaddr/commit/f45630da31
2021-10-07[ruby/ipaddr] Support zone identifiers in IPv6 addressesJeremy Evans
These are supported by Ruby's socket library if the operating system supports zone indentifiers, so they should be supported by ipaddr. See RFCs 4007 and 6874 for additional information. Implements Ruby Feature #10911 https://github.com/ruby/ipaddr/commit/09a6408fb2
2021-10-07[ruby/ipaddr] Add netmask method that returns net mask as string.Bogdan Irimie
https://github.com/ruby/ipaddr/commit/283d16f3a3
2021-10-07[ruby/ipaddr] Disallow leading zeros in maskJeremy Evans
https://github.com/ruby/ipaddr/commit/f49d2d49a4
2021-10-07[ruby/ipaddr] Raise if extra slashes followNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/15832 https://github.com/ruby/ipaddr/commit/de9805d6fa
2021-10-07[ruby/ipaddr] Removing superfluos assingments & returnEspartaco Palma
Also adding test for ntop https://github.com/ruby/ipaddr/commit/0ba16cca10
2019-07-01Assert obsolete method warnings in IPAddrNobuyoshi Nakada
2018-12-18Import ipaddr 1.2.2knu
- Enable frozen_string_literal and do a bit of code cleanup git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Import ipaddr 1.2.0knu
- Add IPAddr#prefix - Add IPAddr#loopback? - Add IPAddr#private? [Feature #11666] - Add IPAddr#link_local? [Feature #10912] - Reject invalid address mask [Bug #13399] - Warn that IPAddr#ipv4_compat and #ipv4_compat? are deprecated [#Bug 13769] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05IPAddr#== and IPAddr#<=> no longer raise an exception if coercion failsknu
* lib/ipaddr.rb (IPAddr#==): If coercion fails, return false instead of passing through the exception. [ruby-core:77451] [Bug #12799] * lib/ipaddr.rb (IPAddr#<=>): If coercion fails, return nil instead of passing through the exception. [ruby-core:77451] [Bug #12799] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23* lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address containedhsbt
EOL string. Patch by @kachick [fix GH-942][Bug #11513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-31* lib/ipaddr.rb: extracted inline tests into test dir.hsbt
* test/test_ipaddr.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02use require_relative.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-13 * test/test_*.rb: Pathname#parent -> Pathname#dirname.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-06 * test/inlinetest.rb, test/{test_generator.rb,test_ipaddr.rb,nahi
test_pathname.rb,test_pp.rb,test_prettyprint.rb,test_set.rb, test_time.rb,test_tsort.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e