summaryrefslogtreecommitdiff
path: root/test/test_ipaddr.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/ipaddr] Fix exception calling `to_range' after `freeze'Espartaco Palma2022-02-101-0/+22
| | | | https://github.com/ruby/ipaddr/commit/77fe1fca0a
* [ruby/ipaddr] Ipaddr#native must also coerce `@mask_addr`Jean Boussier2022-02-101-0/+5
| | | | | | | | | | | 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
* [ruby/ipaddr] Make IPAddr#include? consider range of argumentJeremy Evans2021-10-111-0/+2
| | | | | | | | | | 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
* [ruby/ipaddr] Support zone identifiers in IPv6 addressesJeremy Evans2021-10-071-1/+25
| | | | | | | | | | 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
* [ruby/ipaddr] Add netmask method that returns net mask as string.Bogdan Irimie2021-10-071-0/+11
| | | | https://github.com/ruby/ipaddr/commit/283d16f3a3
* [ruby/ipaddr] Disallow leading zeros in maskJeremy Evans2021-10-071-0/+2
| | | | https://github.com/ruby/ipaddr/commit/f49d2d49a4
* [ruby/ipaddr] Raise if extra slashes followNobuyoshi Nakada2021-10-071-0/+1
| | | | | | https://bugs.ruby-lang.org/issues/15832 https://github.com/ruby/ipaddr/commit/de9805d6fa
* [ruby/ipaddr] Removing superfluos assingments & returnEspartaco Palma2021-10-071-0/+17
| | | | | | Also adding test for ntop https://github.com/ruby/ipaddr/commit/0ba16cca10
* Assert obsolete method warnings in IPAddrNobuyoshi Nakada2019-07-011-3/+9
|
* Import ipaddr 1.2.2knu2018-12-181-1/+1
| | | | | | | - 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
* Import ipaddr 1.2.0knu2017-10-211-2/+104
| | | | | | | | | | | - 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
* IPAddr#== and IPAddr#<=> no longer raise an exception if coercion failsknu2016-11-051-0/+9
| | | | | | | | | | | | * 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
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* * lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address containedhsbt2015-10-231-0/+2
| | | | | | 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
* use assert_raisenobu2015-06-021-11/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ipaddr.rb: extracted inline tests into test dir.hsbt2014-05-311-3/+271
| | | | | | * test/test_ipaddr.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use require_relative.akr2010-02-021-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_*.rb: Pathname#parent -> Pathname#dirname.nahi2004-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/inlinetest.rb, test/{test_generator.rb,test_ipaddr.rb,nahi2004-01-061-0/+4
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