Diff of the two buildlogs: -- --- b1/build.log 2024-04-16 10:11:35.518839132 +0000 +++ b2/build.log 2024-04-16 10:19:09.879498131 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Apr 15 22:09:59 -12 2024 -I: pbuilder-time-stamp: 1713262199 +I: Current time: Wed Apr 17 00:11:48 +14 2024 +I: pbuilder-time-stamp: 1713262308 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -27,52 +27,84 @@ dpkg-source: info: applying no-pry-in-specs.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/20888/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/D01_modify_environment starting +debug: Running on ff4a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Apr 16 10:12 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="21" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.21(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='39180cd3299b44299008d4ef7df16432' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='20888' - PS1='# ' - PS2='> ' + INVOCATION_ID=ba15047a6de14d2b99ced9de594f92b3 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=20061 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Lyq2iy4k/pbuilderrc_uiik --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Lyq2iy4k/b1 --logfile b1/build.log ruby-immutable-ruby_0.1.0-2.dsc' - SUDO_GID='110' - SUDO_UID='103' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Lyq2iy4k/pbuilderrc_r1xq --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Lyq2iy4k/b2 --logfile b2/build.log ruby-immutable-ruby_0.1.0-2.dsc' + SUDO_GID=113 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt64z 6.1.0-20-arm64 #1 SMP Debian 6.1.85-1 (2024-04-11) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-20-armmp-lpae #1 SMP Debian 6.1.85-1 (2024-04-11) armv7l GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Apr 13 07:43 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/20888/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Apr 14 07:45 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -250,7 +282,7 @@ Get: 132 http://deb.debian.org/debian unstable/main armhf ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 133 http://deb.debian.org/debian unstable/main armhf ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] Get: 134 http://deb.debian.org/debian unstable/main armhf ruby-sorted-set all 1.0.3-3 [4736 B] -Fetched 45.4 MB in 1s (74.4 MB/s) +Fetched 45.4 MB in 7s (6890 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.11-minimal:armhf. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19442 files and directories currently installed.) @@ -697,8 +729,8 @@ Setting up tzdata (2024a-2) ... Current default time zone: 'Etc/UTC' -Local time is now: Tue Apr 16 10:10:38 UTC 2024. -Universal Time is now: Tue Apr 16 10:10:38 UTC 2024. +Local time is now: Tue Apr 16 10:15:28 UTC 2024. +Universal Time is now: Tue Apr 16 10:15:28 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... @@ -820,7 +852,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-immutable-ruby-0.1.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-immutable-ruby_0.1.0-2_source.changes +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-immutable-ruby-0.1.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-immutable-ruby_0.1.0-2_source.changes dpkg-buildpackage: info: source package ruby-immutable-ruby dpkg-buildpackage: info: source version 0.1.0-2 dpkg-buildpackage: info: source distribution unstable @@ -848,7 +884,7 @@ dh_prep -O--buildsystem=ruby dh_auto_install --destdir=debian/ruby-immutable-ruby/ -O--buildsystem=ruby dh_ruby --install /build/reproducible-path/ruby-immutable-ruby-0.1.0/debian/ruby-immutable-ruby -/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20240415-25658-x2uzyf/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20240417-28771-hf39ip/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: description and summary are identical WARNING: open-ended dependency on bundler (>= 2.2.10, development) is not recommended @@ -859,7 +895,7 @@ Name: immutable-ruby Version: 0.1.0 File: immutable-ruby-0.1.0.gem -/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-immutable-ruby/usr/share/rubygems-integration/all /tmp/d20240415-25658-x2uzyf/immutable-ruby-0.1.0.gem +/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-immutable-ruby/usr/share/rubygems-integration/all /tmp/d20240417-28771-hf39ip/immutable-ruby-0.1.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/reproducible-path/ruby-immutable-ruby-0.1.0/debian/ruby-immutable-ruby/usr/share/rubygems-integration/all/gems/immutable-ruby-0.1.0/lib/immutable.rb /build/reproducible-path/ruby-immutable-ruby-0.1.0/debian/ruby-immutable-ruby/usr/share/rubygems-integration/all/gems/immutable-ruby-0.1.0/lib/immutable/core_ext.rb @@ -2845,8 +2881,8 @@ Immutable::List Immutable::List["A", "B", "C"] should == ["A", "B", "C"] Immutable::List["A", "B", "C"] should not eql? ["A", "B", "C"] - Immutable::List["A", "B", "C"] should not == # - Immutable::List["A", "B", "C"] should not eql? # + Immutable::List["A", "B", "C"] should not == # + Immutable::List["A", "B", "C"] should not eql? # Immutable::List[] should == [] Immutable::List[] should not eql? [] Immutable::List[] should eql? Immutable::List[] @@ -3555,6596 +3591,41 @@ Immutable::List ensures each node of a lazy list will only be realized on ONE thread, even when accessed by multiple threads doesn't go into an infinite loop if lazy list block raises an exception - doesn't give horrendously bad performance if thread realizing the list sleeps + doesn't give horrendously bad performance if thread realizing the list sleeps (FAILED - 1) -Immutable::List - #none? - on a really big list - doesn't run out of stack - when empty - with a block returns true - with no block returns true - when not empty - with a block - returns false if the block ever returns true ("A") - returns false if the block ever returns true ("B") - returns false if the block ever returns true ("C") - returns false if the block ever returns true (nil) - returns true if the block always returns false - with no block - returns false if any value is truthy - returns true if all values are falsey - -Immutable::List - #one? - on a really big list - doesn't run out of stack - when empty - with a block returns false - with no block returns false - when not empty - with a block - returns false if the block returns true more than once - returns false if the block never returns true - returns true if the block only returns true once - with no block - returns false if more than one value is truthy - returns true if only one value is truthy - -Immutable::List - #partition - is lazy - calls the passed block only once for each item - returns a lazy list of items for which predicate is true - returns a lazy list of items for which predicate is false - calls the passed block only once for each item, even with multiple threads - on [] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - -Immutable::List - #permutation - with no block - returns an Enumerator - with no argument - yields all permutations of the list - with a length argument - yields all N-size permutations of the list - with a length argument greater than length of list - yields nothing - with a length argument of 0 - yields an empty list - with a block - returns the original list - -Immutable::List - #pop - with an empty list - returns an empty list - with a list with a few items - removes the last item - -Immutable::List - #product - on a really big list - doesn't run out of stack - on [] - returns 1 - on [2] - returns 2 - on [1, 3, 5, 7, 11] - returns 1155 - -Immutable::List - #reduce - on a really big list - doesn't run out of stack - on [] - with an initial value of 10 and a block - returns 10 - on [1] - with an initial value of 10 and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 and a block - returns 4 - on [] - with no initial value and a block - returns nil - on [1] - with no initial value and a block - returns 1 - on [1, 2, 3] - with no initial value and a block - returns -4 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - #inject - on a really big list - doesn't run out of stack - on [] - with an initial value of 10 and a block - returns 10 - on [1] - with an initial value of 10 and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 and a block - returns 4 - on [] - with no initial value and a block - returns nil - on [1] - with no initial value and a block - returns 1 - on [1, 2, 3] - with no initial value and a block - returns -4 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - -Immutable::List - #reject - is lazy - on [] - with a block - returns [] - is lazy - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - is lazy - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B", "C"] - is lazy - without a block - returns an Enumerator - on ["A", "b", "C"] - with a block - returns ["A", "C"] - is lazy - without a block - returns an Enumerator - on ["a", "b", "c"] - with a block - returns [] - is lazy - without a block - returns an Enumerator - #delete_if - is lazy - on [] - with a block - returns [] - is lazy - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - is lazy - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B", "C"] - is lazy - without a block - returns an Enumerator - on ["A", "b", "C"] - with a block - returns ["A", "C"] - is lazy - without a block - returns an Enumerator - on ["a", "b", "c"] - with a block - returns [] - is lazy - without a block - returns an Enumerator +Failures: -Immutable::List - #reverse - is lazy - on a really big list - doesn't run out of stack - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns ["A"] - on ["A", "B", "C"] - preserves the original - returns ["C", "B", "A"] + 1) Immutable::List doesn't give horrendously bad performance if thread realizing the list sleeps + Failure/Error: elapsed.should_not > 0.3 -Immutable::List - #rotate - when passed no argument - returns a new list with the first element moved to the end - with an integral argument n - returns a new list with the first (n % size) elements moved to the end - with a non-numeric argument - raises a TypeError - with an argument of zero (or one evenly divisible by list length) - it returns self + expected not: > 0.3 + got: 0.542408109 + # ./spec/lib/immutable/list/multithreading_spec.rb:45:in `block (2 levels) in ' -Immutable::List - #sample - returns a randomly chosen item +Finished in 50.26 seconds (files took 14.5 seconds to load) +1361 examples, 1 failure -Immutable::List - #select - is lazy - with an empty array - with a block - preserves the original - returns the selected list - without a block - returns an Enumerator - with a single item array - with a block - preserves the original - returns the selected list - without a block - returns an Enumerator - with a multi-item array - with a block - preserves the original - returns the selected list - without a block - returns an Enumerator - with a multi-item single selectable array - with a block - preserves the original - returns the selected list - without a block - returns an Enumerator - with a multi-item multi-selectable array - with a block - preserves the original - returns the selected list - without a block - returns an Enumerator - -Immutable::List - #size - on a really big list - doesn't run out of stack - on [] - returns 0 - on ["A"] - returns 1 - on ["A", "B", "C"] - returns 3 - #length - on a really big list - doesn't run out of stack - on [] - returns 0 - on ["A"] - returns 1 - on ["A", "B", "C"] - returns 3 +Failed examples: -Immutable::List - #slice - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the list - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed a subclass of Range - works the same as with a Range - #[] - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the list - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed a subclass of Range - works the same as with a Range +rspec ./spec/lib/immutable/list/multithreading_spec.rb:32 # Immutable::List doesn't give horrendously bad performance if thread realizing the list sleeps -Immutable::List - #sort - is lazy - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - #sort_by - is lazy - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - -List#span - is lazy - given a predicate (in the form of a block), splits the list into two lists - (returned as an array) such that elements in the first list (the prefix) are - taken from the head of the list while the predicate is satisfied, and elements - in the second list (the remainder) are the remaining elements from the list - once the predicate is not satisfied. For example: - given the list [] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [] - returns the remainder as [] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [1] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [1] - returns the remainder as [] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [1, 2] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [1, 2] - returns the remainder as [] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [1, 2, 3] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [1, 2] - returns the remainder as [3] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [1, 2, 3, 4] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [1, 2] - returns the remainder as [3, 4] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [2, 3, 4] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [2] - returns the remainder as [3, 4] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [3, 4] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [] - returns the remainder as [3, 4] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - given the list [4] - and a predicate that returns true for values <= 2 - preserves the original - returns the prefix as [] - returns the remainder as [4] - calls the block only once for each element - without a predicate - returns a frozen array - returns self as the prefix - returns an empty list as the remainder - -Immutable::List - #split_at - is lazy - on [] - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - on [1] - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - on [1, 2] - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - on [1, 2, 3] - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - on [1, 2, 3, 4] - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - -Immutable::List - #subsequences - yields all sublists with 1 or more consecutive items - with no block - returns an Enumerator - -Immutable::List - #sum - on a really big list - doesn't run out of stack - on [] - returns 0 - on [2] - returns 2 - on [1, 3, 5, 7, 11] - returns 27 - -Immutable::List - #tail - on a really big list - doesn't run out of stack - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns [] - on ["A", "B", "C"] - preserves the original - returns ["B", "C"] - -Immutable::List - #tails - is lazy - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns [Immutable::List["A"]] - on ["A", "B", "C"] - preserves the original - returns [Immutable::List["A", "B", "C"], Immutable::List["B", "C"], Immutable::List["C"]] - -Immutable::List - #take - is lazy - 10 from [] - preserves the original - returns [] - 10 from ["A"] - preserves the original - returns ["A"] - -1 from ["A"] - preserves the original - returns [] - 0 from ["A", "B", "C"] - preserves the original - returns [] - 2 from ["A", "B", "C"] - preserves the original - returns ["A", "B"] - -Immutable::List - #take_while - is lazy - on [] - with a block - returns [] - preserves the original - is lazy - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - preserves the original - is lazy - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B"] - preserves the original - is lazy - without a block - returns an Enumerator - -Immutable::List - #to_a - on a really big list - doesn't run out of stack - on [] - returns [] - leaves the original unchanged - returns a mutable array - on ["A"] - returns ["A"] - leaves the original unchanged - returns a mutable array - on ["A", "B", "C"] - returns ["A", "B", "C"] - leaves the original unchanged - returns a mutable array - #entries - on a really big list - doesn't run out of stack - on [] - returns [] - leaves the original unchanged - returns a mutable array - on ["A"] - returns ["A"] - leaves the original unchanged - returns a mutable array - on ["A", "B", "C"] - returns ["A", "B", "C"] - leaves the original unchanged - returns a mutable array - -Immutable::List - #to_ary - on a really big list - doesn't run out of stack - enables implicit conversion to - block parameters - method arguments - works with splat - -Immutable::List - #to_list - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - -Immutable::List - #to_set - on [] - returns a set with the same values - on ["A"] - returns a set with the same values - on ["A", "B", "C"] - returns a set with the same values - -Immutable::List - #transpose - takes a list of lists and returns a list of all the first elements, all the 2nd elements, and so on - only goes as far as the shortest list - -Immutable::List - #union - is lazy - returns [] - for [] and [] - for [] and [] - returns ["A"] - for ["A"] and [] - for [] and ["A"] - returns ["A", "B", "C"] - for ["A", "B", "C"] and [] - for [] and ["A", "B", "C"] - returns ["A"] - for ["A", "A"] and ["A"] - for ["A"] and ["A", "A"] - #| - is lazy - returns [] - for [] and [] - for [] and [] - returns ["A"] - for ["A"] and [] - for [] and ["A"] - returns ["A", "B", "C"] - for ["A", "B", "C"] and [] - for [] and ["A", "B", "C"] - returns ["A"] - for ["A", "A"] and ["A"] - for ["A"] and ["A", "A"] - -Immutable::List - #uniq - is lazy - when passed a block - uses the block to identify duplicates - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns ["A"] - on ["A", "B", "C"] - preserves the original - returns ["A", "B", "C"] - on ["A", "B", "A", "C", "C"] - preserves the original - returns ["A", "B", "C"] - -Immutable::List - #zip - is lazy - on [] and [] - returns [] - on ["A"] and ["aye"] - returns [Immutable::List["A", "aye"]] - on ["A"] and [] - returns [Immutable::List["A", nil]] - on [] and ["A"] - returns [Immutable::List[nil, "A"]] - on ["A", "B", "C"] and ["aye", "bee", "see"] - returns [Immutable::List["A", "aye"], Immutable::List["B", "bee"], Immutable::List["C", "see"]] - -Immutable - .from - with {"a"=>1, "b"=>[2, {"c"=>3}, 4], "d"=>#, "e"=>{"f"=>8, "g"=>9}, "h"=>/ijk/} as input - should return Immutable::Hash["h" => /ijk/, "a" => 1, "b" => Immutable::Vector[2, Immutable::Hash["c" => 3], 4], "e" => Immutable::Hash["f" => 8, "g" => 9], "d" => Immutable::Set[7, 6, 5]] - with {} as input - should return Immutable::Hash[] - with {"a"=>1, "b"=>2, "c"=>3} as input - should return Immutable::Hash["a" => 1, "b" => 2, "c" => 3] - with [] as input - should return Immutable::Vector[] - with [1, 2, 3] as input - should return Immutable::Vector[1, 2, 3] - with # as input - should return Immutable::Set[] - with # as input - should return Immutable::Set[3, 2, 1] - with 42 as input - should return 42 - with #> as input - should return #> - with # as input - should return Immutable::Hash[:name => nil, :address => nil] - with # as input - should return Immutable::Hash[:name => "Dave", :address => "123 Main"] - with mixed object - should return Immutable data - .to_ruby - with Immutable::Hash["h" => /ijk/, "a" => 1, "b" => Immutable::Vector[2, Immutable::Hash["c" => 3], 4], "e" => Immutable::Hash["f" => 8, "g" => 9], "d" => Immutable::Set[7, 6, 5]] as input - should return {"a"=>1, "b"=>[2, {"c"=>3}, 4], "d"=>#, "e"=>{"f"=>8, "g"=>9}, "h"=>/ijk/} - with Immutable::Hash[] as input - should return {} - with Immutable::Hash["a" => 1, "b" => 2, "c" => 3] as input - should return {"a"=>1, "b"=>2, "c"=>3} - with Immutable::Vector[] as input - should return [] - with Immutable::Vector[1, 2, 3] as input - should return [1, 2, 3] - with Immutable::Set[] as input - should return # - with Immutable::Set[3, 2, 1] as input - should return # - with 42 as input - should return 42 - with #> as input - should return #> - with Immutable::Deque[] as input - should return [] - with Immutable::Deque[Immutable::Hash["a" => 1]] as input - should return [{"a" => 1}] - with Immutable::SortedSet[] as input - should return ::SortedSet.new - with Immutable::SortedSet[1, 2, 3] as input - should return ::SortedSet.new - with mixed object - should return Ruby data structures - -Immutable::Set - #add - can add nil to a set - works on large sets, with many combinations of input - with a unique value - preserves the original - returns a copy with the superset of values - with a duplicate value - preserves the original values - returns self - #<< - can add nil to a set - works on large sets, with many combinations of input - with a unique value - preserves the original - returns a copy with the superset of values - with a duplicate value - preserves the original values - returns self - #add? - with a unique value - preserves the original - returns a copy with the superset of values - with a duplicate value - preserves the original values - returns false - -Immutable::Set - #all? - when empty - with a block returns true - with no block returns true - when not empty - with a block - returns true if the block always returns true - returns false if the block ever returns false - propagates an exception from the block - stops iterating as soon as the block returns false - with no block - returns true if all values are truthy - returns false if any value is nil - returns false if any value is false - -Immutable::Set - #any? - when empty - with a block returns false - with no block returns false - when not empty - with a block - returns true if the block ever returns true ("A") - returns true if the block ever returns true ("B") - returns true if the block ever returns true ("C") - returns true if the block ever returns true (nil) - returns false if the block always returns false - propagates exceptions raised in the block - stops iterating as soon as the block returns true - with no block - returns true if any value is truthy - returns false if all values are falsey - -Immutable::Set - #clear - on [] - preserves the original - returns an empty set - on ["A"] - preserves the original - returns an empty set - on ["A", "B", "C"] - preserves the original - returns an empty set - from a subclass - returns an empty instance of the subclass - -Immutable::Set - #compact - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns ["A"] - on ["A", "B", "C"] - preserves the original - returns ["A", "B", "C"] - on [nil] - preserves the original - returns [] - on [nil, "B"] - preserves the original - returns ["B"] - on ["A", nil] - preserves the original - returns ["A"] - on [nil, nil] - preserves the original - returns [] - on ["A", nil, "C"] - preserves the original - returns ["A", "C"] - on [nil, "B", nil] - preserves the original - returns ["B"] - -Immutable::Set - .set - with no values - returns the empty set - with a list of values - is equivalent to repeatedly using #add - -Immutable::Set - #dup - returns self - #clone - returns self - -Immutable::Set - #count - works on large sets - on [] - with a block - returns 0 - without a block - returns length - on [1] - with a block - returns 1 - without a block - returns length - on [1, 2] - with a block - returns 1 - without a block - returns length - on [1, 2, 3] - with a block - returns 2 - without a block - returns length - on [1, 2, 3, 4] - with a block - returns 2 - without a block - returns length - on [1, 2, 3, 4, 5] - with a block - returns 3 - without a block - returns length - -Immutable::Set - #delete - works on large sets, with many combinations of input - with an existing value - preserves the original - returns a copy with the remaining values - with a non-existing value - preserves the original values - returns self - when removing the last value in a set - returns the canonical empty set - #delete? - with an existing value - preserves the original - returns a copy with the remaining values - with a non-existing value - preserves the original values - returns false - -Immutable::Set - #difference - works on a wide variety of inputs - for [] and [] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - doesn't modify the original Sets - returns ["A"] - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - doesn't modify the original Sets - returns ["A", "C"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["A", "C"] - doesn't modify the original Sets - returns ["B"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "D", "E", "F", "G", "H"] and [] - doesn't modify the original Sets - returns ["A", "B", "C", "D", "E", "F", "G", "H"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "M", "X", "Y", "Z"] and ["B", "C", "D", "E", "F", "G", "H", "I", "J", "X"] - doesn't modify the original Sets - returns ["A", "M", "Y", "Z"] - when passed a Ruby Array - returns the expected Set - #subtract - works on a wide variety of inputs - for [] and [] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - doesn't modify the original Sets - returns ["A"] - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - doesn't modify the original Sets - returns ["A", "C"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["A", "C"] - doesn't modify the original Sets - returns ["B"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "D", "E", "F", "G", "H"] and [] - doesn't modify the original Sets - returns ["A", "B", "C", "D", "E", "F", "G", "H"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "M", "X", "Y", "Z"] and ["B", "C", "D", "E", "F", "G", "H", "I", "J", "X"] - doesn't modify the original Sets - returns ["A", "M", "Y", "Z"] - when passed a Ruby Array - returns the expected Set - #- - works on a wide variety of inputs - for [] and [] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - doesn't modify the original Sets - returns ["A"] - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - doesn't modify the original Sets - returns ["A", "C"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["A", "C"] - doesn't modify the original Sets - returns ["B"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "D", "E", "F", "G", "H"] and [] - doesn't modify the original Sets - returns ["A", "B", "C", "D", "E", "F", "G", "H"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C", "M", "X", "Y", "Z"] and ["B", "C", "D", "E", "F", "G", "H", "I", "J", "X"] - doesn't modify the original Sets - returns ["A", "M", "Y", "Z"] - when passed a Ruby Array - returns the expected Set - -Immutable::Set - #disjoint? - for [] and [] - returns true - for ["A"] and [] - returns true - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["D", "E"] - returns true - for ["F", "G", "H", "I"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["D", "E", "F", "G"] and ["A", "B", "C"] - returns true - -Immutable::Set - #each - yields both of a pair of colliding keys - without a block - returns an Enumerator - with an empty block - returns self - with a block - yields all values - -Immutable::Set - #empty? - on [] - returns true - on ["A"] - returns false - on ["A", "B", "C"] - returns false - on [nil] - returns false - on [false] - returns false - .empty - returns the canonical empty set - from a subclass - returns an empty instance of the subclass - calls overridden #initialize when creating empty Set - -Immutable::Set - #== - when comparing to a standard set - returns false - when comparing to a arbitrary object - returns false - with an empty set for each comparison - returns true - with an empty set and a set with nil - returns false - with a single item array and empty array - returns false - with matching single item array - returns true - with mismatching single item array - returns false - with a multi-item array and single item array - returns false - with matching multi-item array - returns true - with a mismatching multi-item array - returns true - -Immutable::Set - #eql? - when comparing to a standard set - returns false - when comparing to a arbitrary object - returns false - when comparing with a subclass of Immutable::Set - returns false - with an empty set for each comparison - returns true - with an empty set and a set with nil - returns false - with a single item array and empty array - returns false - with matching single item array - returns true - with mismatching single item array - returns false - with a multi-item array and single item array - returns false - with matching multi-item array - returns true - with a mismatching multi-item array - returns true - -Immutable::Set - #exclusion - works for a wide variety of inputs - for [] and [] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - doesn't modify the original Sets - returns ["A"] - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - doesn't modify the original Sets - returns ["A", "C"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B", "C", "D"] - doesn't modify the original Sets - returns ["A", "D"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["D", "E", "F"] - doesn't modify the original Sets - returns ["A", "B", "C", "D", "E", "F"] - when passed a Ruby Array - returns the expected Set - #^ - works for a wide variety of inputs - for [] and [] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - doesn't modify the original Sets - returns ["A"] - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - doesn't modify the original Sets - returns [] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - doesn't modify the original Sets - returns ["A", "C"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B", "C", "D"] - doesn't modify the original Sets - returns ["A", "D"] - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["D", "E", "F"] - doesn't modify the original Sets - returns ["A", "B", "C", "D", "E", "F"] - when passed a Ruby Array - returns the expected Set - -Immutable::Set - #find - on [] - with a block - returns nil - without a block - returns an Enumerator - on [] - with a block - returns nil - without a block - returns an Enumerator - on ["A"] - with a block - returns "A" - without a block - returns an Enumerator - on ["A"] - with a block - returns nil - without a block - returns an Enumerator - on ["A"] - with a block - returns nil - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns "A" - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns "B" - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns nil - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns nil - without a block - returns an Enumerator - #detect - on [] - with a block - returns nil - without a block - returns an Enumerator - on [] - with a block - returns nil - without a block - returns an Enumerator - on ["A"] - with a block - returns "A" - without a block - returns an Enumerator - on ["A"] - with a block - returns nil - without a block - returns an Enumerator - on ["A"] - with a block - returns nil - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns "A" - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns "B" - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns nil - without a block - returns an Enumerator - on ["A", "B", nil] - with a block - returns nil - without a block - returns an Enumerator - -Immutable::Set - #first - returns nil if only member of set is nil - returns the first item yielded by #each - on an empty set - returns nil - on a non-empty set - returns an arbitrary value from the set - -Immutable - #flatten - on ["A"] - preserves the original - returns the inlined values - on ["A", "B", "C"] - preserves the original - returns the inlined values - on ["A", Immutable::Set["B"], "C"] - preserves the original - returns the inlined values - on [Immutable::Set["A"], Immutable::Set["B"], Immutable::Set["C"]] - preserves the original - returns the inlined values - on an empty set - returns an empty set - on a set with multiple levels of nesting - inlines lower levels of nesting - from a subclass - returns an instance of the subclass - -Immutable::Set - #grep - without a block - with an empty set - returns the filtered values - with a single item set - returns the filtered values - with a single item set that doesn't contain match - returns the filtered values - with a multi-item set where one isn't a match - returns the filtered values - with a block - with an empty set - returns the filtered values - with a single item set - returns the filtered values - with a single item set that doesn't contain match - returns the filtered values - with a multi-item set where one isn't a match - returns the filtered values - -Immutable::Set - #grep_v - without a block - with an empty set - returns the filtered values - with a single item set - returns the filtered values - with a single item set that doesn't contain match - returns the filtered values - with a multi-item set where one isn't a match - returns the filtered values - with a block - resulting items are processed with the block - returns the filtered values - -Immutable::Set - #group_by - returns a hash without default proc - with a block - on [] - returns [] - on [1] - returns [{true=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{true=>Immutable::Set[3, 1], false=>Immutable::Set[2, 4]}] - without a block - on [] - returns [] - on [1] - returns [{1=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{1=>Immutable::Set[1], 2=>Immutable::Set[2], 3=>Immutable::Set[3], 4=>Immutable::Set[4]}] - on an empty set - returns an empty hash - from a subclass - returns an Hash whose values are instances of the subclass - #group - returns a hash without default proc - with a block - on [] - returns [] - on [1] - returns [{true=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{true=>Immutable::Set[3, 1], false=>Immutable::Set[2, 4]}] - without a block - on [] - returns [] - on [1] - returns [{1=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{1=>Immutable::Set[1], 2=>Immutable::Set[2], 3=>Immutable::Set[3], 4=>Immutable::Set[4]}] - on an empty set - returns an empty hash - from a subclass - returns an Hash whose values are instances of the subclass - #classify - returns a hash without default proc - with a block - on [] - returns [] - on [1] - returns [{true=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{true=>Immutable::Set[3, 1], false=>Immutable::Set[2, 4]}] - without a block - on [] - returns [] - on [1] - returns [{1=>Immutable::Set[1]}] - on [1, 2, 3, 4] - returns [{1=>Immutable::Set[1], 2=>Immutable::Set[2], 3=>Immutable::Set[3], 4=>Immutable::Set[4]}] - on an empty set - returns an empty hash - from a subclass - returns an Hash whose values are instances of the subclass - -Immutable::Set - #hash - generates the same hash value for a set regardless of the order things were added to it - values are sufficiently distributed - on an empty set - returns 0 - -Immutable::Set - #include? - returns true for an existing value ("A") - returns true for an existing value ("B") - returns true for an existing value ("C") - returns true for an existing value (2.0) - returns true for an existing value (nil) - returns false for a non-existing value - returns true even if existing value is nil - returns true even if existing value is false - returns false for a mutable item which is mutated after adding - uses #eql? for equality - returns the right answers after a lot of addings and removings - #member? - returns true for an existing value ("A") - returns true for an existing value ("B") - returns true for an existing value ("C") - returns true for an existing value (2.0) - returns true for an existing value (nil) - returns false for a non-existing value - returns true even if existing value is nil - returns true even if existing value is false - returns false for a mutable item which is mutated after adding - uses #eql? for equality - returns the right answers after a lot of addings and removings - -Immutable::Set - #inspect - on [] - returns "Immutable::Set[]" - returns a string which can be eval'd to get an equivalent set - on ["A"] - returns "Immutable::Set[\"A\"]" - returns a string which can be eval'd to get an equivalent set - on ["A", "B", "C"] - returns a programmer-readable representation of the set contents - returns a string which can be eval'd to get an equivalent set - from a subclass - returns a programmer-readable representation of the set contents - returns a string which can be eval'd to get an equivalent set - -Immutable::Set - #intersect? - for [] and [] - returns false - for ["A"] and [] - returns false - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["D", "E"] - returns false - for ["F", "G", "H", "I"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["D", "E", "F", "G"] and ["A", "B", "C"] - returns false - -Immutable::Set - #intersection - returns results consistent with Array#& - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - returns [], without changing the original Sets - for [] and ["A"] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - returns ["B"], without changing the original Sets - for ["B"] and ["A", "B", "C"] - returns ["B"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["A", "C"] - returns ["A", "C"], without changing the original Sets - for ["A", "C"] and ["A", "B", "C"] - returns ["A", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - #& - returns results consistent with Array#& - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A"] and [] - returns [], without changing the original Sets - for [] and ["A"] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["B"] - returns ["B"], without changing the original Sets - for ["B"] and ["A", "B", "C"] - returns ["B"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - for ["A", "B", "C"] and ["A", "C"] - returns ["A", "C"], without changing the original Sets - for ["A", "C"] and ["A", "B", "C"] - returns ["A", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - -Immutable::Set - #join - with a separator - on [] - preserves the original - returns "" - on ["A"] - preserves the original - returns "A" - on ["A", "B", "C"] - preserves the original - returns "A|B|C" - without a separator - on [] - preserves the original - returns "" - on ["A"] - preserves the original - returns "A" - on ["A", "B", "C"] - preserves the original - returns "ABC" - without a separator (with global default separator set) - on ['A', 'B', 'C'] - preserves the original - returns nil - -Immutable::Set - #map - works on large sets - when empty - returns self - when not empty - with a block - preserves the original values - returns a new set with the mapped values - with no block - returns an Enumerator - from a subclass - returns an instance of the subclass - when multiple items map to the same value - filters out the duplicates - #collect - works on large sets - when empty - returns self - when not empty - with a block - preserves the original values - returns a new set with the mapped values - with no block - returns an Enumerator - from a subclass - returns an instance of the subclass - when multiple items map to the same value - filters out the duplicates - -Immutable::Set - #marshal_dump/#marshal_load - can survive dumping and loading into a new process - is still possible to test items by key after loading - -Immutable::Set - #max - with a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - without a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "San" - -Immutable::Set - #min - with a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ni" - without a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - -Immutable::Set - .new - initializes a new set - accepts a Range - returns a Set which doesn't change even if the initializer is mutated - is amenable to overriding of #initialize - from a subclass - returns a frozen instance of the subclass - [] - accepts any number of arguments and initializes a new set - -Immutable::Set - #none? - when empty - with a block returns true - with no block returns true - when not empty - with a block - returns false if the block ever returns true ("A") - returns false if the block ever returns true ("B") - returns false if the block ever returns true ("C") - returns false if the block ever returns true (nil) - returns true if the block always returns false - stops iterating as soon as the block returns true - with no block - returns false if any value is truthy - returns true if all values are falsey - -Immutable::Set - #one? - when empty - with a block returns false - with no block returns false - when not empty - with a block - returns false if the block returns true more than once - returns false if the block never returns true - returns true if the block only returns true once - with no block - returns false if more than one value is truthy - returns true if only one value is truthy - returns false if no values are truthy - -Immutable::Set - #partition - on [] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - -Immutable::Set - #product - on [] - returns 1 - doesn't change the original Set - on [2] - returns 2 - doesn't change the original Set - on [1, 3, 5, 7, 11] - returns 1155 - doesn't change the original Set - -Immutable::Set - #reduce - on [] - with an initial value of 10 - and a block - returns 10 - on [1] - with an initial value of 10 - and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 - and a block - returns 4 - on [] - with no initial value - and a block - returns nil - on [1] - with no initial value - and a block - returns 1 - on [1, 2, 3] - with no initial value - and a block - returns 6 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - #inject - on [] - with an initial value of 10 - and a block - returns 10 - on [1] - with an initial value of 10 - and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 - and a block - returns 4 - on [] - with no initial value - and a block - returns nil - on [1] - with no initial value - and a block - returns 1 - on [1, 2, 3] - with no initial value - and a block - returns 6 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - -Immutable::Set - #reject - when nothing matches - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns self - on a large set, with many combinations of input - still works - #delete_if - when nothing matches - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns self - on a large set, with many combinations of input - still works - -Immutable::Set - #reverse_each - without a block - returns an Enumerator - with an empty block - returns self - with a block - yields all values - -Immutable::Set - #sample - returns a randomly chosen item - -Immutable::Set - #select - works on a large set, with many combinations of input - when everything matches - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns the canonical empty set - from a subclass - returns an instance of the same class - #find_all - works on a large set, with many combinations of input - when everything matches - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns the canonical empty set - from a subclass - returns an instance of the same class - -Immutable::Set - #size - returns 0 for [] - returns 1 for ["A"] - returns 3 for ["A", "B", "C"] - #length - returns 0 for [] - returns 1 for ["A"] - returns 3 for ["A", "B", "C"] - -Immutable::Set - #sort - on [] - with a block - returns [] - doesn't change the original Set - without a block - returns [] - doesn't change the original Set - on ["A"] - with a block - returns ["A"] - doesn't change the original Set - without a block - returns ["A"] - doesn't change the original Set - on ["Ichi", "Ni", "San"] - with a block - returns ["Ni", "San", "Ichi"] - doesn't change the original Set - without a block - returns ["Ichi", "Ni", "San"] - doesn't change the original Set - #sort_by - on [] - with a block - returns [] - doesn't change the original Set - without a block - returns [] - doesn't change the original Set - on ["A"] - with a block - returns ["A"] - doesn't change the original Set - without a block - returns ["A"] - doesn't change the original Set - on ["Ichi", "Ni", "San"] - with a block - returns ["Ni", "San", "Ichi"] - doesn't change the original Set - without a block - returns ["Ichi", "Ni", "San"] - doesn't change the original Set - #sort_by - calls the passed block no more than twice for each item - -Immutable::Set - #subset? - for [] and [] - returns true - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - #<= - for [] and [] - returns true - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - #proper_subset? - for [] and [] - returns false - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - #< - for [] and [] - returns false - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - -Immutable::Set - #sum - on [] - returns 0 - doesn't change the original Set - on [2] - returns 2 - doesn't change the original Set - on [1, 3, 5, 7, 11] - returns 27 - doesn't change the original Set - -Immutable::Set - #superset? - for [] and [] - returns true - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - #>= - for [] and [] - returns true - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - #proper_superset? - for [] and [] - returns false - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - #> - for [] and [] - returns false - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - -Immutable::Set - #to_a - on 'a'..'a' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'b' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'c' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'d' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'e' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'f' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'g' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'h' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'i' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'j' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'k' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'l' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'m' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'n' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'o' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'p' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'q' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'r' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'s' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'t' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'u' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'v' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'w' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'x' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'y' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'z' - returns an equivalent array - doesn't change the original Set - returns a mutable array - #entries - on 'a'..'a' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'b' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'c' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'d' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'e' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'f' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'g' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'h' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'i' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'j' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'k' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'l' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'m' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'n' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'o' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'p' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'q' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'r' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'s' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'t' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'u' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'v' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'w' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'x' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'y' - returns an equivalent array - doesn't change the original Set - returns a mutable array - on 'a'..'z' - returns an equivalent array - doesn't change the original Set - returns a mutable array - -Immutable::Set - #to_list - on [] - returns a list - doesn't change the original Set - the returned list - has the correct length - contains all values - on ["A"] - returns a list - doesn't change the original Set - the returned list - has the correct length - contains all values - on ["A", "B", "C"] - returns a list - doesn't change the original Set - the returned list - has the correct length - contains all values - -Immutable::Set - #to_set - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - -Immutable::Set - #union - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and [] - returns ["A"], without changing the original Sets - for [] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for [] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and [] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and [] - returns ["A", "B", "C"], without changing the original Sets - for [] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["X", "Y", "Z"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - for ["X", "Y", "Z"] and ["A", "B", "C"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - when receiving a subset - returns self - #| - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and [] - returns ["A"], without changing the original Sets - for [] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for [] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and [] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and [] - returns ["A", "B", "C"], without changing the original Sets - for [] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["X", "Y", "Z"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - for ["X", "Y", "Z"] and ["A", "B", "C"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - when receiving a subset - returns self - #+ - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and [] - returns ["A"], without changing the original Sets - for [] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for [] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and [] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and [] - returns ["A", "B", "C"], without changing the original Sets - for [] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["X", "Y", "Z"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - for ["X", "Y", "Z"] and ["A", "B", "C"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - when receiving a subset - returns self - #merge - for [] and [] - returns [], without changing the original Sets - for [] and [] - returns [], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and [] - returns ["A"], without changing the original Sets - for [] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and ["A"] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for [] and ["A"] - returns ["A"], without changing the original Sets - for ["A"] and [] - returns ["A"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and [] - returns ["A", "B", "C"], without changing the original Sets - for [] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - for ["A", "B", "C"] and ["A", "B", "C"] - returns ["A", "B", "C"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - for ["A", "B", "C"] and ["X", "Y", "Z"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - for ["X", "Y", "Z"] and ["A", "B", "C"] - returns ["A", "B", "C", "X", "Y", "Z"], without changing the original Sets - when passed a Ruby Array - returns the expected Set - from a subclass - returns an instance of the subclass - when receiving a subset - returns self - -Immutable::SortedSet - #above - when called without a block - returns a sorted set of all items higher than the argument - when called with a block - yields all the items higher than the argument - on an empty set - returns an empty set - with an argument higher than all the values in the set - returns an empty set - -Immutable::SortedSet - #add - with a unique value - preserves the original - returns a copy with the superset of values (in order) - with a duplicate value - preserves the original values - returns self - on a set ordered by a comparator - inserts the new item in the correct place - #<< - with a unique value - preserves the original - returns a copy with the superset of values (in order) - with a duplicate value - preserves the original values - returns self - on a set ordered by a comparator - inserts the new item in the correct place - #add? - with a unique value - preserves the original - returns a copy with the superset of values - with a duplicate value - preserves the original values - returns false - -Immutable::SortedSet - #at - [] with 10 - returns nil - ["A"] with 10 - returns nil - ["A", "B", "C"] with 0 - returns "A" - ["A", "B", "C"] with 1 - returns "B" - ["A", "B", "C"] with 2 - returns "C" - ["A", "B", "C"] with 3 - returns nil - ["A", "B", "C"] with -1 - returns "C" - ["A", "B", "C"] with -2 - returns "B" - ["A", "B", "C"] with -3 - returns "A" - ["A", "B", "C"] with -4 - returns nil - -Immutable::SortedSet - #below - when called without a block - returns a sorted set of all items lower than the argument - when called with a block - yields all the items lower than the argument - on an empty set - returns an empty set - with an argument lower than all the values in the set - returns an empty set - -Immutable::SortedSet - #between - when called without a block - returns a sorted set of all items from the first argument to the second - when called with a block - yields all the items lower than the argument - on an empty set - returns an empty set - with a 'to' argument lower than the 'from' argument - returns an empty set - -Immutable::SortedSet - #clear - on [] - preserves the original - returns an empty set - on ["A"] - preserves the original - returns an empty set - on ["A", "B", "C"] - preserves the original - returns an empty set - from a subclass - returns an empty instance of the subclass - with a comparator - returns an empty instance with same comparator - -Immutable::SortedSet - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - on 1..32 - returns self - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - on 1..32 - returns self - -Immutable::SortedSet - #delete_at - removes the element at the specified index - makes no modification if the index is out of range - -Immutable::SortedSet - #delete - on an empty set - returns an empty set - with an existing value - preserves the original - returns a copy with the remaining of values - with a non-existing value - preserves the original values - returns self - when removing the last value in a sorted set - maintains the set order - when the set is in natural order - returns the canonical empty set - on [1, 2, 3], when deleting [1, 2, 3] - returns [] - on [1, 2, 3, 4], when deleting [1, 2, 3] - returns [4] - on [1, 2, 3, 4], when deleting [1, 2, 4] - returns [3] - on [1, 2, 3, 4], when deleting [1, 3, 4] - returns [2] - on [1, 2, 3, 4], when deleting [2, 3, 4] - returns [1] - on [1, 2, 3, 4, 5], when deleting [1, 2, 3] - returns [4, 5] - on [1, 2, 3, 4, 5], when deleting [1, 2, 4] - returns [3, 5] - on [1, 2, 3, 4, 5], when deleting [1, 2, 5] - returns [3, 4] - on [1, 2, 3, 4, 5], when deleting [1, 3, 4] - returns [2, 5] - on [1, 2, 3, 4, 5], when deleting [1, 3, 5] - returns [2, 4] - on [1, 2, 3, 4, 5], when deleting [1, 4, 5] - returns [2, 3] - on [1, 2, 3, 4, 5], when deleting [2, 3, 4] - returns [1, 5] - on [1, 2, 3, 4, 5], when deleting [2, 3, 5] - returns [1, 4] - on [1, 2, 3, 4, 5], when deleting [2, 4, 5] - returns [1, 3] - on [1, 2, 3, 4, 5], when deleting [3, 4, 5] - returns [1, 2] - on [1, 2, 3, 4, 5, 6], when deleting [1, 2, 3] - returns [4, 5, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 2, 4] - returns [3, 5, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 2, 5] - returns [3, 4, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 2, 6] - returns [3, 4, 5] - on [1, 2, 3, 4, 5, 6], when deleting [1, 3, 4] - returns [2, 5, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 3, 5] - returns [2, 4, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 3, 6] - returns [2, 4, 5] - on [1, 2, 3, 4, 5, 6], when deleting [1, 4, 5] - returns [2, 3, 6] - on [1, 2, 3, 4, 5, 6], when deleting [1, 4, 6] - returns [2, 3, 5] - on [1, 2, 3, 4, 5, 6], when deleting [1, 5, 6] - returns [2, 3, 4] - on [1, 2, 3, 4, 5, 6], when deleting [2, 3, 4] - returns [1, 5, 6] - on [1, 2, 3, 4, 5, 6], when deleting [2, 3, 5] - returns [1, 4, 6] - on [1, 2, 3, 4, 5, 6], when deleting [2, 3, 6] - returns [1, 4, 5] - on [1, 2, 3, 4, 5, 6], when deleting [2, 4, 5] - returns [1, 3, 6] - on [1, 2, 3, 4, 5, 6], when deleting [2, 4, 6] - returns [1, 3, 5] - on [1, 2, 3, 4, 5, 6], when deleting [2, 5, 6] - returns [1, 3, 4] - on [1, 2, 3, 4, 5, 6], when deleting [3, 4, 5] - returns [1, 2, 6] - on [1, 2, 3, 4, 5, 6], when deleting [3, 4, 6] - returns [1, 2, 5] - on [1, 2, 3, 4, 5, 6], when deleting [3, 5, 6] - returns [1, 2, 4] - on [1, 2, 3, 4, 5, 6], when deleting [4, 5, 6] - returns [1, 2, 3] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 2, 3] - returns [4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 2, 4] - returns [3, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 2, 5] - returns [3, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 2, 6] - returns [3, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 2, 7] - returns [3, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 3, 4] - returns [2, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 3, 5] - returns [2, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 3, 6] - returns [2, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 3, 7] - returns [2, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 4, 5] - returns [2, 3, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 4, 6] - returns [2, 3, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 4, 7] - returns [2, 3, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 5, 6] - returns [2, 3, 4, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 5, 7] - returns [2, 3, 4, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [1, 6, 7] - returns [2, 3, 4, 5] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 3, 4] - returns [1, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 3, 5] - returns [1, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 3, 6] - returns [1, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 3, 7] - returns [1, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 4, 5] - returns [1, 3, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 4, 6] - returns [1, 3, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 4, 7] - returns [1, 3, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 5, 6] - returns [1, 3, 4, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 5, 7] - returns [1, 3, 4, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [2, 6, 7] - returns [1, 3, 4, 5] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 4, 5] - returns [1, 2, 6, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 4, 6] - returns [1, 2, 5, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 4, 7] - returns [1, 2, 5, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 5, 6] - returns [1, 2, 4, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 5, 7] - returns [1, 2, 4, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [3, 6, 7] - returns [1, 2, 4, 5] - on [1, 2, 3, 4, 5, 6, 7], when deleting [4, 5, 6] - returns [1, 2, 3, 7] - on [1, 2, 3, 4, 5, 6, 7], when deleting [4, 5, 7] - returns [1, 2, 3, 6] - on [1, 2, 3, 4, 5, 6, 7], when deleting [4, 6, 7] - returns [1, 2, 3, 5] - on [1, 2, 3, 4, 5, 6, 7], when deleting [5, 6, 7] - returns [1, 2, 3, 4] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 3] - returns [4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 4] - returns [3, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 5] - returns [3, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 6] - returns [3, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 7] - returns [3, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 2, 8] - returns [3, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 3, 4] - returns [2, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 3, 5] - returns [2, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 3, 6] - returns [2, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 3, 7] - returns [2, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 3, 8] - returns [2, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 4, 5] - returns [2, 3, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 4, 6] - returns [2, 3, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 4, 7] - returns [2, 3, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 4, 8] - returns [2, 3, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 5, 6] - returns [2, 3, 4, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 5, 7] - returns [2, 3, 4, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 5, 8] - returns [2, 3, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 6, 7] - returns [2, 3, 4, 5, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 6, 8] - returns [2, 3, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [1, 7, 8] - returns [2, 3, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 3, 4] - returns [1, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 3, 5] - returns [1, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 3, 6] - returns [1, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 3, 7] - returns [1, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 3, 8] - returns [1, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 4, 5] - returns [1, 3, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 4, 6] - returns [1, 3, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 4, 7] - returns [1, 3, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 4, 8] - returns [1, 3, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 5, 6] - returns [1, 3, 4, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 5, 7] - returns [1, 3, 4, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 5, 8] - returns [1, 3, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 6, 7] - returns [1, 3, 4, 5, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 6, 8] - returns [1, 3, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [2, 7, 8] - returns [1, 3, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 4, 5] - returns [1, 2, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 4, 6] - returns [1, 2, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 4, 7] - returns [1, 2, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 4, 8] - returns [1, 2, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 5, 6] - returns [1, 2, 4, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 5, 7] - returns [1, 2, 4, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 5, 8] - returns [1, 2, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 6, 7] - returns [1, 2, 4, 5, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 6, 8] - returns [1, 2, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [3, 7, 8] - returns [1, 2, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 5, 6] - returns [1, 2, 3, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 5, 7] - returns [1, 2, 3, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 5, 8] - returns [1, 2, 3, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 6, 7] - returns [1, 2, 3, 5, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 6, 8] - returns [1, 2, 3, 5, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [4, 7, 8] - returns [1, 2, 3, 5, 6] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [5, 6, 7] - returns [1, 2, 3, 4, 8] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [5, 6, 8] - returns [1, 2, 3, 4, 7] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [5, 7, 8] - returns [1, 2, 3, 4, 6] - on [1, 2, 3, 4, 5, 6, 7, 8], when deleting [6, 7, 8] - returns [1, 2, 3, 4, 5] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 3] - returns [4, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 4] - returns [3, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 5] - returns [3, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 6] - returns [3, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 7] - returns [3, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 8] - returns [3, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 2, 9] - returns [3, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 4] - returns [2, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 5] - returns [2, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 6] - returns [2, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 7] - returns [2, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 8] - returns [2, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 3, 9] - returns [2, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 4, 5] - returns [2, 3, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 4, 6] - returns [2, 3, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 4, 7] - returns [2, 3, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 4, 8] - returns [2, 3, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 4, 9] - returns [2, 3, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 5, 6] - returns [2, 3, 4, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 5, 7] - returns [2, 3, 4, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 5, 8] - returns [2, 3, 4, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 5, 9] - returns [2, 3, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 6, 7] - returns [2, 3, 4, 5, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 6, 8] - returns [2, 3, 4, 5, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 6, 9] - returns [2, 3, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 7, 8] - returns [2, 3, 4, 5, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 7, 9] - returns [2, 3, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [1, 8, 9] - returns [2, 3, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 4] - returns [1, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 5] - returns [1, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 6] - returns [1, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 7] - returns [1, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 8] - returns [1, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 3, 9] - returns [1, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 4, 5] - returns [1, 3, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 4, 6] - returns [1, 3, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 4, 7] - returns [1, 3, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 4, 8] - returns [1, 3, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 4, 9] - returns [1, 3, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 5, 6] - returns [1, 3, 4, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 5, 7] - returns [1, 3, 4, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 5, 8] - returns [1, 3, 4, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 5, 9] - returns [1, 3, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 6, 7] - returns [1, 3, 4, 5, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 6, 8] - returns [1, 3, 4, 5, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 6, 9] - returns [1, 3, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 7, 8] - returns [1, 3, 4, 5, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 7, 9] - returns [1, 3, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [2, 8, 9] - returns [1, 3, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 4, 5] - returns [1, 2, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 4, 6] - returns [1, 2, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 4, 7] - returns [1, 2, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 4, 8] - returns [1, 2, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 4, 9] - returns [1, 2, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 5, 6] - returns [1, 2, 4, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 5, 7] - returns [1, 2, 4, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 5, 8] - returns [1, 2, 4, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 5, 9] - returns [1, 2, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 6, 7] - returns [1, 2, 4, 5, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 6, 8] - returns [1, 2, 4, 5, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 6, 9] - returns [1, 2, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 7, 8] - returns [1, 2, 4, 5, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 7, 9] - returns [1, 2, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [3, 8, 9] - returns [1, 2, 4, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 5, 6] - returns [1, 2, 3, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 5, 7] - returns [1, 2, 3, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 5, 8] - returns [1, 2, 3, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 5, 9] - returns [1, 2, 3, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 6, 7] - returns [1, 2, 3, 5, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 6, 8] - returns [1, 2, 3, 5, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 6, 9] - returns [1, 2, 3, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 7, 8] - returns [1, 2, 3, 5, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 7, 9] - returns [1, 2, 3, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [4, 8, 9] - returns [1, 2, 3, 5, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 6, 7] - returns [1, 2, 3, 4, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 6, 8] - returns [1, 2, 3, 4, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 6, 9] - returns [1, 2, 3, 4, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 7, 8] - returns [1, 2, 3, 4, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 7, 9] - returns [1, 2, 3, 4, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [5, 8, 9] - returns [1, 2, 3, 4, 6, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [6, 7, 8] - returns [1, 2, 3, 4, 5, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [6, 7, 9] - returns [1, 2, 3, 4, 5, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [6, 8, 9] - returns [1, 2, 3, 4, 5, 7] - on [1, 2, 3, 4, 5, 6, 7, 8, 9], when deleting [7, 8, 9] - returns [1, 2, 3, 4, 5, 6] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 3] - returns [4, 5, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 4] - returns [3, 5, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 5] - returns [3, 4, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 6] - returns [3, 4, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 7] - returns [3, 4, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 8] - returns [3, 4, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 9] - returns [3, 4, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 2, 10] - returns [3, 4, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 4] - returns [2, 5, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 5] - returns [2, 4, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 6] - returns [2, 4, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 7] - returns [2, 4, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 8] - returns [2, 4, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 9] - returns [2, 4, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 3, 10] - returns [2, 4, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 5] - returns [2, 3, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 6] - returns [2, 3, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 7] - returns [2, 3, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 8] - returns [2, 3, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 9] - returns [2, 3, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 4, 10] - returns [2, 3, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 5, 6] - returns [2, 3, 4, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 5, 7] - returns [2, 3, 4, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 5, 8] - returns [2, 3, 4, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 5, 9] - returns [2, 3, 4, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 5, 10] - returns [2, 3, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 6, 7] - returns [2, 3, 4, 5, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 6, 8] - returns [2, 3, 4, 5, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 6, 9] - returns [2, 3, 4, 5, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 6, 10] - returns [2, 3, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 7, 8] - returns [2, 3, 4, 5, 6, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 7, 9] - returns [2, 3, 4, 5, 6, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 7, 10] - returns [2, 3, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 8, 9] - returns [2, 3, 4, 5, 6, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 8, 10] - returns [2, 3, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [1, 9, 10] - returns [2, 3, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 4] - returns [1, 5, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 5] - returns [1, 4, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 6] - returns [1, 4, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 7] - returns [1, 4, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 8] - returns [1, 4, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 9] - returns [1, 4, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 3, 10] - returns [1, 4, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 5] - returns [1, 3, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 6] - returns [1, 3, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 7] - returns [1, 3, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 8] - returns [1, 3, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 9] - returns [1, 3, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 4, 10] - returns [1, 3, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 5, 6] - returns [1, 3, 4, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 5, 7] - returns [1, 3, 4, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 5, 8] - returns [1, 3, 4, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 5, 9] - returns [1, 3, 4, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 5, 10] - returns [1, 3, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 6, 7] - returns [1, 3, 4, 5, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 6, 8] - returns [1, 3, 4, 5, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 6, 9] - returns [1, 3, 4, 5, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 6, 10] - returns [1, 3, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 7, 8] - returns [1, 3, 4, 5, 6, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 7, 9] - returns [1, 3, 4, 5, 6, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 7, 10] - returns [1, 3, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 8, 9] - returns [1, 3, 4, 5, 6, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 8, 10] - returns [1, 3, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [2, 9, 10] - returns [1, 3, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 5] - returns [1, 2, 6, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 6] - returns [1, 2, 5, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 7] - returns [1, 2, 5, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 8] - returns [1, 2, 5, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 9] - returns [1, 2, 5, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 4, 10] - returns [1, 2, 5, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 5, 6] - returns [1, 2, 4, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 5, 7] - returns [1, 2, 4, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 5, 8] - returns [1, 2, 4, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 5, 9] - returns [1, 2, 4, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 5, 10] - returns [1, 2, 4, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 6, 7] - returns [1, 2, 4, 5, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 6, 8] - returns [1, 2, 4, 5, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 6, 9] - returns [1, 2, 4, 5, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 6, 10] - returns [1, 2, 4, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 7, 8] - returns [1, 2, 4, 5, 6, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 7, 9] - returns [1, 2, 4, 5, 6, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 7, 10] - returns [1, 2, 4, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 8, 9] - returns [1, 2, 4, 5, 6, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 8, 10] - returns [1, 2, 4, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [3, 9, 10] - returns [1, 2, 4, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 5, 6] - returns [1, 2, 3, 7, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 5, 7] - returns [1, 2, 3, 6, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 5, 8] - returns [1, 2, 3, 6, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 5, 9] - returns [1, 2, 3, 6, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 5, 10] - returns [1, 2, 3, 6, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 6, 7] - returns [1, 2, 3, 5, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 6, 8] - returns [1, 2, 3, 5, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 6, 9] - returns [1, 2, 3, 5, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 6, 10] - returns [1, 2, 3, 5, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 7, 8] - returns [1, 2, 3, 5, 6, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 7, 9] - returns [1, 2, 3, 5, 6, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 7, 10] - returns [1, 2, 3, 5, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 8, 9] - returns [1, 2, 3, 5, 6, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 8, 10] - returns [1, 2, 3, 5, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [4, 9, 10] - returns [1, 2, 3, 5, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 6, 7] - returns [1, 2, 3, 4, 8, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 6, 8] - returns [1, 2, 3, 4, 7, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 6, 9] - returns [1, 2, 3, 4, 7, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 6, 10] - returns [1, 2, 3, 4, 7, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 7, 8] - returns [1, 2, 3, 4, 6, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 7, 9] - returns [1, 2, 3, 4, 6, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 7, 10] - returns [1, 2, 3, 4, 6, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 8, 9] - returns [1, 2, 3, 4, 6, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 8, 10] - returns [1, 2, 3, 4, 6, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [5, 9, 10] - returns [1, 2, 3, 4, 6, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 7, 8] - returns [1, 2, 3, 4, 5, 9, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 7, 9] - returns [1, 2, 3, 4, 5, 8, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 7, 10] - returns [1, 2, 3, 4, 5, 8, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 8, 9] - returns [1, 2, 3, 4, 5, 7, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 8, 10] - returns [1, 2, 3, 4, 5, 7, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [6, 9, 10] - returns [1, 2, 3, 4, 5, 7, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [7, 8, 9] - returns [1, 2, 3, 4, 5, 6, 10] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [7, 8, 10] - returns [1, 2, 3, 4, 5, 6, 9] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [7, 9, 10] - returns [1, 2, 3, 4, 5, 6, 8] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], when deleting [8, 9, 10] - returns [1, 2, 3, 4, 5, 6, 7] - #delete? - with an existing value - preserves the original - returns a copy with the remaining values - with a non-existing value - preserves the original values - returns false - -Immutable::SortedSet - #difference - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for ["A"] and ["A"] - returns [] - for ["A", "B", "C"] and ["B"] - returns ["A", "C"] - for ["A", "B", "C"] and ["A", "C"] - returns ["B"] - for ["A", "B", "C", "D", "E", "F"] and ["B", "E", "F", "G", "M", "X"] - returns ["A", "C", "D"] - #subtract - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for ["A"] and ["A"] - returns [] - for ["A", "B", "C"] and ["B"] - returns ["A", "C"] - for ["A", "B", "C"] and ["A", "C"] - returns ["B"] - for ["A", "B", "C", "D", "E", "F"] and ["B", "E", "F", "G", "M", "X"] - returns ["A", "C", "D"] - #- - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for ["A"] and ["A"] - returns [] - for ["A", "B", "C"] and ["B"] - returns ["A", "C"] - for ["A", "B", "C"] and ["A", "C"] - returns ["B"] - for ["A", "B", "C", "D", "E", "F"] and ["B", "E", "F", "G", "M", "X"] - returns ["A", "C", "D"] - -Immutable::SortedSet - #disjoint? - for [] and [] - returns true - for ["A"] and [] - returns true - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["D", "E"] - returns true - for ["F", "G", "H", "I"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["D", "E", "F", "G"] and ["A", "B", "C"] - returns true - -Immutable::SortedSet - #drop - 0 from [] - preserves the original - returns [] - 10 from [] - preserves the original - returns [] - 10 from ["A"] - preserves the original - returns [] - 0 from ["A", "B", "C"] - preserves the original - returns ["A", "B", "C"] - 1 from ["A", "B", "C"] - preserves the original - returns ["B", "C"] - 2 from ["A", "B", "C"] - preserves the original - returns ["C"] - 3 from ["A", "B", "C"] - preserves the original - returns [] - when argument is zero - returns self - when the set has a custom order - maintains the custom order - keeps the comparator even when set is cleared - when called on a subclass - should return an instance of the subclass - -Immutable::SortedSet - #drop_while - on [] - with a block - preserves the original - returns [] - without a block - returns an Enumerator - on ["A"] - with a block - preserves the original - returns [] - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - preserves the original - returns ["C"] - without a block - returns an Enumerator - on ["A", "B", "C", "D", "E", "F", "G"] - with a block - preserves the original - returns ["C", "D", "E", "F", "G"] - without a block - returns an Enumerator - -Immutable::SortedSet - #each - with no block - returns an Enumerator - with a block - returns self - iterates over the items in order - -Immutable::SortedSet - #empty? - on [] - returns true - on ["A"] - returns false - on ["A", "B", "C"] - returns false - .empty - returns the canonical empty set - from a subclass - returns an empty instance of the subclass - -Immutable::SortedSet - #eql? - when comparing to a standard set - returns false - when comparing to a arbitrary object - returns false - when comparing to an Immutable::Set - returns false - when comparing with a subclass of Immutable::SortedSet - returns false - with an empty set for each comparison - returns true - with an empty set and a set with nil - returns false - with a single item array and empty array - returns false - with matching single item array - returns true - with mismatching single item array - returns false - with a multi-item array and single item array - returns false - with matching multi-item array - returns true - with a mismatching multi-item array - returns true - with the same values, but a different sort order - returns false - -Immutable::SortedSet - #exclusion - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for ["A"] and ["A"] - returns [] - for ["A", "B", "C"] and ["B"] - returns ["A", "C"] - for ["A", "B", "C"] and ["B", "C", "D"] - returns ["A", "D"] - for ["A", "B", "C"] and ["D", "E", "F"] - returns ["A", "B", "C", "D", "E", "F"] - #^ - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for ["A"] and ["A"] - returns [] - for ["A", "B", "C"] and ["B"] - returns ["A", "C"] - for ["A", "B", "C"] and ["B", "C", "D"] - returns ["A", "D"] - for ["A", "B", "C"] and ["D", "E", "F"] - returns ["A", "B", "C", "D", "E", "F"] - -Immutable::SortedSet - #fetch - gives precedence to default block over default argument if passed both - with no default provided - when the index exists - returns the value at the index - when the key does not exist - raises an IndexError - with a default value - when the index exists - returns the value at the index - when the index does not exist - returns the default value - with a default block - when the index exists - returns the value at the index - when the index does not exist - invokes the block with the missing index as parameter - -Immutable::SortedSet - #find_index - looking for "A" in [] without block - returns nil - looking for "A" in [] with block - returns nil - looking for nil in [] with block - returns nil - looking for "A" in ["A"] without block - returns 0 - looking for "A" in ["A"] with block - returns 0 - looking for "B" in ["A"] without block - returns nil - looking for "B" in ["A"] with block - returns nil - looking for nil in ["A"] with block - returns nil - looking for "A" in ["A", "B", "C"] without block - returns 0 - looking for "A" in ["A", "B", "C"] with block - returns 0 - looking for "B" in ["A", "B", "C"] without block - returns 1 - looking for "B" in ["A", "B", "C"] with block - returns 1 - looking for "C" in ["A", "B", "C"] without block - returns 2 - looking for "C" in ["A", "B", "C"] with block - returns 2 - looking for "D" in ["A", "B", "C"] without block - returns nil - looking for "D" in ["A", "B", "C"] with block - returns nil - looking for 1 in 0..1 without block - returns 1 - looking for 1 in 0..1 with block - returns 1 - looking for 5 in 0..10 without block - returns 5 - looking for 5 in 0..10 with block - returns 5 - looking for 10 in 0..10 without block - returns 10 - looking for 10 in 0..10 with block - returns 10 - looking for 2 in [2] without block - returns 0 - looking for 2 in [2] with block - returns 0 - looking for 2.0 in [2] without block - returns 0 - looking for 2.0 in [2] with block - returns 0 - looking for 2.0 in [2.0] without block - returns 0 - looking for 2.0 in [2.0] with block - returns 0 - looking for 2 in [2.0] without block - returns 0 - looking for 2 in [2.0] with block - returns 0 - #index - looking for "A" in [] without block - returns nil - looking for "A" in [] with block - returns nil - looking for nil in [] with block - returns nil - looking for "A" in ["A"] without block - returns 0 - looking for "A" in ["A"] with block - returns 0 - looking for "B" in ["A"] without block - returns nil - looking for "B" in ["A"] with block - returns nil - looking for nil in ["A"] with block - returns nil - looking for "A" in ["A", "B", "C"] without block - returns 0 - looking for "A" in ["A", "B", "C"] with block - returns 0 - looking for "B" in ["A", "B", "C"] without block - returns 1 - looking for "B" in ["A", "B", "C"] with block - returns 1 - looking for "C" in ["A", "B", "C"] without block - returns 2 - looking for "C" in ["A", "B", "C"] with block - returns 2 - looking for "D" in ["A", "B", "C"] without block - returns nil - looking for "D" in ["A", "B", "C"] with block - returns nil - looking for 1 in 0..1 without block - returns 1 - looking for 1 in 0..1 with block - returns 1 - looking for 5 in 0..10 without block - returns 5 - looking for 5 in 0..10 with block - returns 5 - looking for 10 in 0..10 without block - returns 10 - looking for 10 in 0..10 with block - returns 10 - looking for 2 in [2] without block - returns 0 - looking for 2 in [2] with block - returns 0 - looking for 2.0 in [2] without block - returns 0 - looking for 2.0 in [2] with block - returns 0 - looking for 2.0 in [2.0] without block - returns 0 - looking for 2.0 in [2.0] with block - returns 0 - looking for 2 in [2.0] without block - returns 0 - looking for 2 in [2.0] with block - returns 0 - -Immutable::SortedSet - #first - on [] - returns nil - on ["A"] - returns "A" - on ["A", "B", "C"] - returns "A" - on ["Z", "Y", "X"] - returns "X" - -Immutable::SortedSet - #from - when called without a block - returns a sorted set of all items equal to or greater than the argument - when called with a block - yields all the items equal to or greater than than the argument - on an empty set - returns an empty set - with an argument higher than all the values in the set - returns an empty set - -Immutable::SortedSet - #group_by - with a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{true=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{true=>Immutable::SortedSet[1, 3], false=>Immutable::SortedSet[2, 4]}] - without a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{1=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{1=>Immutable::SortedSet[1], 2=>Immutable::SortedSet[2], 3=>Immutable::SortedSet[3], 4=>Immutable::SortedSet[4]}] - from a subclass - returns an Hash whose values are instances of the subclass - #group - with a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{true=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{true=>Immutable::SortedSet[1, 3], false=>Immutable::SortedSet[2, 4]}] - without a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{1=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{1=>Immutable::SortedSet[1], 2=>Immutable::SortedSet[2], 3=>Immutable::SortedSet[3], 4=>Immutable::SortedSet[4]}] - from a subclass - returns an Hash whose values are instances of the subclass - #classify - with a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{true=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{true=>Immutable::SortedSet[1, 3], false=>Immutable::SortedSet[2, 4]}] - without a block - on [] - preserves the original - returns [] - on [1] - preserves the original - returns [{1=>Immutable::SortedSet[1]}] - on [1, 2, 3, 4] - preserves the original - returns [{1=>Immutable::SortedSet[1], 2=>Immutable::SortedSet[2], 3=>Immutable::SortedSet[3], 4=>Immutable::SortedSet[4]}] - from a subclass - returns an Hash whose values are instances of the subclass - -Immutable::SortedSet - #include? - returns true for an existing value (1) - returns true for an existing value (2) - returns true for an existing value (3) - returns true for an existing value (4.0) - returns false for a non-existing value - uses #<=> for equality - #member? - returns true for an existing value (1) - returns true for an existing value (2) - returns true for an existing value (3) - returns true for an existing value (4.0) - returns false for a non-existing value - uses #<=> for equality - -Immutable::SortedSet - #inspect - on [] - returns "Immutable::SortedSet[]" - returns a string which can be eval'd to get an equivalent set - on ["A"] - returns "Immutable::SortedSet[\"A\"]" - returns a string which can be eval'd to get an equivalent set - on ["C", "B", "A"] - returns "Immutable::SortedSet[\"A\", \"B\", \"C\"]" - returns a string which can be eval'd to get an equivalent set - from a subclass - returns a programmer-readable representation of the set contents - returns a string which can be eval'd to get an equivalent set - -Immutable::SortedSet - #intersect? - for [] and [] - returns false - for ["A"] and [] - returns false - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["D", "E"] - returns false - for ["F", "G", "H", "I"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["D", "E", "F", "G"] and ["A", "B", "C"] - returns false - -Immutable::SortedSet - #intersection - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns [] - for [] and ["A"] - returns [] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and ["B"] - returns ["B"] - for ["B"] and ["A", "B", "C"] - returns ["B"] - for ["A", "B", "C"] and ["A", "C"] - returns ["A", "C"] - for ["A", "C"] and ["A", "B", "C"] - returns ["A", "C"] - for ["A", "M", "T", "X"] and ["B", "C", "D", "E", "F", "G", "H", "I", "M", "P", "Q", "T", "U"] - returns ["M", "T"] - for ["B", "C", "D", "E", "F", "G", "H", "I", "M", "P", "Q", "T", "U"] and ["A", "M", "T", "X"] - returns ["M", "T"] - #& - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns [] - for [] and ["A"] - returns [] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and ["B"] - returns ["B"] - for ["B"] and ["A", "B", "C"] - returns ["B"] - for ["A", "B", "C"] and ["A", "C"] - returns ["A", "C"] - for ["A", "C"] and ["A", "B", "C"] - returns ["A", "C"] - for ["A", "M", "T", "X"] and ["B", "C", "D", "E", "F", "G", "H", "I", "M", "P", "Q", "T", "U"] - returns ["M", "T"] - for ["B", "C", "D", "E", "F", "G", "H", "I", "M", "P", "Q", "T", "U"] and ["A", "M", "T", "X"] - returns ["M", "T"] - -Immutable::SortedSet - #last - with an empty set - returns the last item - with a single item set - returns the last item - with a multi-item set - returns the last item - -Immutable::SortedSet - #map - when empty - returns self - when not empty - with a block - preserves the original values - returns a new set with the mapped values - filters out duplicates - with no block - returns an Enumerator - on a set ordered by a comparator - returns a new set with the mapped values - filters out duplicates - #collect - when empty - returns self - when not empty - with a block - preserves the original values - returns a new set with the mapped values - filters out duplicates - with no block - returns an Enumerator - on a set ordered by a comparator - returns a new set with the mapped values - filters out duplicates - -Immutable::SortedSet - #marshal_dump/#marshal_load - can survive dumping and loading into a new process - is still possible to find items by index after loading - raises a TypeError if set has a custom sort order - -Immutable::SortedSet - #max - with a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - without a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "San" - -Immutable::SortedSet - #min - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - on [1, 2, 3, 4, 5] - returns 1 - on [0, -0.0, 2.2, -4, -4.2] - returns -4.2 - -Immutable::SortedSet - .new - accepts a single enumerable argument and creates a new sorted set - also works with a Range - doesn't mutate the initializer - doesn't change if the initializer is later mutated - is amenable to overriding of #initialize - accepts a block with arity 1 - accepts a block with arity 2 - can use a block produced by Symbol#to_proc - filters out duplicates - when passed a comparator with arity 2 - still filters out duplicates - still doesn't mutate the initializer - still doesn't change if the initializer is later mutated - when passed a block with arity 1 - still filters out duplicates - still doesn't mutate the initializer - still doesn't change if the initializer is later mutated - from a subclass - returns a frozen instance of the subclass - .[] - accepts a variable number of items and creates a new sorted set - filters out duplicate items - -Immutable::SortedSet - #reverse_each - with no block - returns an Enumerator - with a block - returns self - iterates over the items in order - -Immutable::SortedSet - #sample - returns a randomly chosen item - -Immutable::SortedSet - #select - when everything matches - preserves the original - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns the canonical empty set - from a subclass - returns an instance of the same class - #find_all - when everything matches - preserves the original - returns self - when only some things match - with a block - preserves the original - returns a set with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns the canonical empty set - from a subclass - returns an instance of the same class - -Immutable::SortedSet - #size - returns 0 for [] - returns 1 for ["A"] - returns 3 for ["A", "B", "C"] - #length - returns 0 for [] - returns 1 for ["A"] - returns 3 for ["A", "B", "C"] - -Immutable::SortedSet - #slice - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the sorted_set - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed an empty Range - does not lose custom sort order - when passed a length of zero - does not lose custom sort order - when passed a subclass of Range - works the same as with a Range - on a subclass of SortedSet - with index and count or a range, returns an instance of the subclass - #[] - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the sorted_set - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed an empty Range - does not lose custom sort order - when passed a length of zero - does not lose custom sort order - when passed a subclass of Range - works the same as with a Range - on a subclass of SortedSet - with index and count or a range, returns an instance of the subclass - -Immutable::SortedSet - #sort - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - #sort_by - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - sort - on a SortedSet with custom sort order - returns a SortedSet with the natural sort order - -Immutable::SortedSet - #subset? - for [] and [] - returns true - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - #proper_subset? - for [] and [] - returns false - for ["A"] and [] - returns false - for [] and ["A"] - returns true - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns false - for ["B"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "C"] - returns false - for ["A", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns true - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns false - -Immutable::SortedSet - #superset? - for [] and [] - returns true - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns true - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns true - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - #proper_superset? - for [] and [] - returns false - for ["A"] and [] - returns true - for [] and ["A"] - returns false - for ["A"] and ["A"] - returns false - for ["A", "B", "C"] and ["B"] - returns true - for ["B"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "C"] - returns true - for ["A", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C"] - returns false - for ["A", "B", "C"] and ["A", "B", "C", "D"] - returns false - for ["A", "B", "C", "D"] and ["A", "B", "C"] - returns true - -Immutable::SortedSet - #take - 10 from [] - preserves the original - returns [] - 10 from ["A"] - preserves the original - returns ["A"] - 0 from ["A", "B", "C"] - preserves the original - returns [] - 2 from ["A", "B", "C"] - preserves the original - returns ["A", "B"] - when argument is at least size of receiver - returns self - when the set has a custom order - maintains the custom order - keeps the comparator even when set is cleared - when called on a subclass - should return an instance of the subclass - -Immutable::SortedSet - #take_while - on [] - with a block - returns [] - preserves the original - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - preserves the original - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B"] - preserves the original - without a block - returns an Enumerator - -Immutable::SortedSet - #to_set - on [] - returns a set with the same values - on ["A"] - returns a set with the same values - on ["A", "B", "C"] - returns a set with the same values - -Immutable::SortedSet - #union - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for [] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and [] - returns ["A", "B", "C"] - for [] and ["A", "B", "C"] - returns ["A", "B", "C"] - for ["A", "C", "E", "G", "X"] and ["B", "C", "D", "E", "H", "M"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - for ["B", "C", "D", "E", "H", "M"] and ["A", "C", "E", "G", "X"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - #| - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for [] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and [] - returns ["A", "B", "C"] - for [] and ["A", "B", "C"] - returns ["A", "B", "C"] - for ["A", "C", "E", "G", "X"] and ["B", "C", "D", "E", "H", "M"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - for ["B", "C", "D", "E", "H", "M"] and ["A", "C", "E", "G", "X"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - #+ - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for [] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and [] - returns ["A", "B", "C"] - for [] and ["A", "B", "C"] - returns ["A", "B", "C"] - for ["A", "C", "E", "G", "X"] and ["B", "C", "D", "E", "H", "M"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - for ["B", "C", "D", "E", "H", "M"] and ["A", "C", "E", "G", "X"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - #merge - for [] and [] - returns [] - for [] and [] - returns [] - for ["A"] and [] - returns ["A"] - for [] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A"] and ["A"] - returns ["A"] - for ["A", "B", "C"] and [] - returns ["A", "B", "C"] - for [] and ["A", "B", "C"] - returns ["A", "B", "C"] - for ["A", "C", "E", "G", "X"] and ["B", "C", "D", "E", "H", "M"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - for ["B", "C", "D", "E", "H", "M"] and ["A", "C", "E", "G", "X"] - returns ["A", "B", "C", "D", "E", "G", "H", "M", "X"] - union - filters out duplicates when passed an Array - doesn't mutate an Array which is passed in - on a set ordered by a comparator - still filters out duplicates when passed an Array - still doesn't mutate an Array which is passed in - -Immutable::SortedSet - #up_to - when called without a block - returns a sorted set of all items equal to or less than the argument - when called with a block - yields all the items equal to or less than than the argument - on an empty set - returns an empty set - with an argument less than all the values in the set - returns an empty set - -Immutable::SortedSet - .uniq_by_comparator! - can handle empty arrays - can handle arrays with 1 element - can handle arrays with 2 elements and no dupes - can handle arrays with 2 elements and dupes - can handle arrays with lots of elements - works with funny comparators - -Immutable::SortedSet - #values_at - accepts any number of indices, and returns a sorted_set of items at those indices - when passed invalid indices - filters them out - when passed no arguments - returns an empty sorted_set - from a subclass - returns an instance of the subclass - -Immutable::Vector - #add - with a empty vector adding a single item - preserves the original - adds the item to the vector - with a single-item vector adding a different item - preserves the original - adds the item to the vector - with a single-item vector adding a duplicate item - preserves the original - adds the item to the vector - with a 31-item vector adding a different item - preserves the original - adds the item to the vector - with a 32-item vector adding a different item - preserves the original - adds the item to the vector - with a 33-item vector adding a different item - preserves the original - adds the item to the vector - with a 1023-item vector adding a different item - preserves the original - adds the item to the vector - with a 1024-item vector adding a different item - preserves the original - adds the item to the vector - with a 1025-item vector adding a different item - preserves the original - adds the item to the vector - from a subclass - returns an instance of the subclass - #<< - with a empty vector adding a single item - preserves the original - adds the item to the vector - with a single-item vector adding a different item - preserves the original - adds the item to the vector - with a single-item vector adding a duplicate item - preserves the original - adds the item to the vector - with a 31-item vector adding a different item - preserves the original - adds the item to the vector - with a 32-item vector adding a different item - preserves the original - adds the item to the vector - with a 33-item vector adding a different item - preserves the original - adds the item to the vector - with a 1023-item vector adding a different item - preserves the original - adds the item to the vector - with a 1024-item vector adding a different item - preserves the original - adds the item to the vector - with a 1025-item vector adding a different item - preserves the original - adds the item to the vector - from a subclass - returns an instance of the subclass - #push - with a empty vector adding a single item - preserves the original - adds the item to the vector - with a single-item vector adding a different item - preserves the original - adds the item to the vector - with a single-item vector adding a duplicate item - preserves the original - adds the item to the vector - with a 31-item vector adding a different item - preserves the original - adds the item to the vector - with a 32-item vector adding a different item - preserves the original - adds the item to the vector - with a 33-item vector adding a different item - preserves the original - adds the item to the vector - with a 1023-item vector adding a different item - preserves the original - adds the item to the vector - with a 1024-item vector adding a different item - preserves the original - adds the item to the vector - with a 1025-item vector adding a different item - preserves the original - adds the item to the vector - from a subclass - returns an instance of the subclass - -Immutable::Vector - #any? - when created with no values - with a block - returns false - with a block - returns false - when created with values - with a block that returns true - returns true - with a block that doesn't return true - returns false - without a block - with some values that are truthy - returns true - with all values that are falsey - returns false - -Immutable::Vector - #assoc - searches for a 2-element array with a given 1st item - returns nil if a matching 1st item is not found - uses #== to compare 1st items with provided object - skips elements which are not indexable - #rassoc - searches for a 2-element array with a given 2nd item - returns nil if a matching 2nd item is not found - uses #== to compare 2nd items with provided object - skips elements which are not indexable - -Immutable::Vector - #bsearch - with a block which returns false for elements below desired position, and true for those at/above - returns the first element for which the predicate is true - if the block always returns false - returns nil - if the block always returns true - returns the first element - with a block which returns a negative number for elements below desired position, zero for the right element, and positive for those above - returns the element for which the block returns zero - if the block always returns positive - returns nil - if the block always returns negative - returns nil - if the block returns sometimes positive, sometimes negative, but never zero - returns nil - if not passed a block - returns an Enumerator - on an empty vector - returns nil - -Immutable::Vector - #clear - on [] - preserves the original - returns an empty vector - from a subclass - returns an instance of the subclass - on ["A"] - preserves the original - returns an empty vector - from a subclass - returns an instance of the subclass - on ["A", "B", "C"] - preserves the original - returns an empty vector - from a subclass - returns an instance of the subclass - -Immutable::Vector - #combination - works on many combinations of input - leaves the original unmodified - with a block - returns self - with no block - returns an Enumerator - when passed an argument which is out of bounds - yields nothing and returns self - when passed an argument zero - yields an empty array - when passed an argument equal to the vector's length - yields self as an array - when passed an argument 1 - yields each item in the vector, as single-item vectors - when passed another integral argument - yields all combinations of the given length - on an empty vector - works the same - -Immutable::Vector - #compact - returns a new Vector with all nils removed - doesn't remove false - on an empty vector - returns self - from a subclass - returns an instance of the subclass - -Immutable::Vector - #<=> - with [] and [1] - returns -1 - with [1] and [] - returns 1 - with [] and [] - returns 0 - with [1] and [2] - returns -1 - with [2] and [1] - returns 1 - with [1] and [1] - returns 0 - with [1] and [1, 2] - returns -1 - with [1, 2] and [1] - returns 1 - with [1] and [1] - returns 0 - with [2, 3, 4] and [3, 4, 5] - returns -1 - with [3, 4, 5] and [2, 3, 4] - returns 1 - with [2, 3, 4] and [2, 3, 4] - returns 0 - with [[0]] and [[1]] - returns -1 - with [[1]] and [[0]] - returns 1 - with [[0]] and [[0]] - returns 0 - -Immutable::Vector - #+ - preserves the original - appends the elements in the other enumerable - on a 1-item vector - works the same - on a 31-item vector - works the same - on a 32-item vector - works the same - on a 33-item vector - works the same - on a 1023-item vector - works the same - on a 1024-item vector - works the same - on a 1025-item vector - works the same - #concat - preserves the original - appends the elements in the other enumerable - on a 1-item vector - works the same - on a 31-item vector - works the same - on a 32-item vector - works the same - on a 33-item vector - works the same - on a 1023-item vector - works the same - on a 1024-item vector - works the same - on a 1025-item vector - works the same - -Immutable::Vector - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - on 1..32 - returns self - on [] - returns self - on ["A"] - returns self - on ["A", "B", "C"] - returns self - on 1..32 - returns self - -Immutable::Vector - #count - returns the number of elements - returns the number of elements that equal the argument - returns the number of element for which the block evaluates to true - -Immutable::Vector - #delete_at - removes the element at the specified index - makes no modification if the index is out of range - works when deleting last item at boundary where vector trie needs to get shallower - works on an empty vector - works on a vector with 1 item - works on a vector with 32 items - has the right size and contents after many deletions - -Immutable::Vector - #delete - removes elements that are #== to the argument - on an empty vector - returns self - on a subclass of Vector - returns an instance of the subclass - -Immutable::Vector - #dig - returns value at the index with one argument - returns value at index in nested arrays - raises an error when indexing deeper than possible - returns nil if you index past the end of an array - raises an error when indexing with a key vectors don't understand - -Immutable::Vector - #drop - raises an ArgumentError if number of elements specified is negative - 10 from [] - preserves the original - returns [] - 10 from ["A"] - preserves the original - returns [] - 1 from ["A"] - preserves the original - returns [] - 0 from ["A"] - preserves the original - returns ["A"] - 0 from ["A", "B", "C"] - preserves the original - returns ["A", "B", "C"] - 2 from ["A", "B", "C"] - preserves the original - returns ["C"] - 3 from 1..32 - preserves the original - returns 4..32 - 32 from 1..33 - preserves the original - returns [33] - when number of elements specified is zero - returns self - -Immutable::Vector - #drop_while - returns an empty vector if block is always true - stops dropping items if block returns nil - stops dropping items if block returns false - on [] - with a block - preserves the original - returns [] - without a block - returns an Enumerator - on ["A"] - with a block - preserves the original - returns [] - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - preserves the original - returns ["C"] - without a block - returns an Enumerator - on an empty vector - returns an empty vector - -Immutable::Vector - #each_index - with a block - yields all the valid indices into the vector - returns self - without a block - returns an Enumerator - on an empty vector - doesn't yield anything - on a 1-item vector - yields all valid indices - on a 2-item vector - yields all valid indices - on a 10-item vector - yields all valid indices - on a 31-item vector - yields all valid indices - on a 32-item vector - yields all valid indices - on a 33-item vector - yields all valid indices - on a 1000-item vector - yields all valid indices - on a 1024-item vector - yields all valid indices - on a 1025-item vector - yields all valid indices - -Immutable::Vector - #each - with no block - returns an Enumerator - on a 31-item vector - with a block - returns self - yields all the items - iterates over the items in order - on a 32-item vector - with a block - returns self - yields all the items - iterates over the items in order - on a 33-item vector - with a block - returns self - yields all the items - iterates over the items in order - on a 1023-item vector - with a block - returns self - yields all the items - iterates over the items in order - on a 1024-item vector - with a block - returns self - yields all the items - iterates over the items in order - on a 1025-item vector - with a block - returns self - yields all the items - iterates over the items in order - on an empty vector - doesn't yield anything - -Immutable::Vector - #each_with_index - with no block - returns an Enumerator - on a 1-item vector - with a block - returns self - iterates over the items in order - on a 2-item vector - with a block - returns self - iterates over the items in order - on a 31-item vector - with a block - returns self - iterates over the items in order - on a 32-item vector - with a block - returns self - iterates over the items in order - on a 33-item vector - with a block - returns self - iterates over the items in order - on a 1023-item vector - with a block - returns self - iterates over the items in order - on a 1024-item vector - with a block - returns self - iterates over the items in order - on a 1025-item vector - with a block - returns self - iterates over the items in order - on an empty vector - doesn't yield anything - -Immutable::Vector - #empty? - on [] - returns true - on ["A"] - returns false - on ["A", "B", "C"] - returns false - .empty - returns the canonical empty vector - from a subclass - returns an empty instance of the subclass - calls overridden #initialize when creating empty Hash - -Immutable::Vector - #eql - returns false when comparing with an array with the same contents - returns false when comparing with an arbitrary object - returns false when comparing an empty vector with an empty array - returns false when comparing with a subclass of Immutable::Vector - #== - returns true when comparing with an array with the same contents - returns false when comparing with an arbitrary object - returns true when comparing an empty vector with an empty array - returns true when comparing with a subclass of Immutable::Vector - works on larger vectors - #eql? - returns true - for vectors [] and [] - for vectors [] and [] - returns false - for vectors [] and [nil] - for vectors [nil] and [] - returns false - for vectors ["A"] and [] - for vectors [] and ["A"] - returns true - for vectors ["A"] and ["A"] - for vectors ["A"] and ["A"] - returns false - for vectors ["A"] and ["B"] - for vectors ["B"] and ["A"] - returns false - for vectors ["A", "B"] and ["A"] - for vectors ["A"] and ["A", "B"] - returns true - for vectors ["A", "B", "C"] and ["A", "B", "C"] - for vectors ["A", "B", "C"] and ["A", "B", "C"] - returns false - for vectors ["C", "A", "B"] and ["A", "B", "C"] - for vectors ["A", "B", "C"] and ["C", "A", "B"] - #== - returns true - for vectors [] and [] - for vectors [] and [] - returns false - for vectors [] and [nil] - for vectors [nil] and [] - returns false - for vectors ["A"] and [] - for vectors [] and ["A"] - returns true - for vectors ["A"] and ["A"] - for vectors ["A"] and ["A"] - returns false - for vectors ["A"] and ["B"] - for vectors ["B"] and ["A"] - returns false - for vectors ["A", "B"] and ["A"] - for vectors ["A"] and ["A", "B"] - returns true - for vectors ["A", "B", "C"] and ["A", "B", "C"] - for vectors ["A", "B", "C"] and ["A", "B", "C"] - returns false - for vectors ["C", "A", "B"] and ["A", "B", "C"] - for vectors ["A", "B", "C"] and ["C", "A", "B"] - -Immutable::Vector - #fetch - gives precedence to default block over default argument if passed both - with no default provided - when the index exists - returns the value at the index - when the key does not exist - raises an IndexError - with a default value - when the index exists - returns the value at the index - when the index does not exist - returns the default value - with a default block - when the index exists - returns the value at the index - when the index does not exist - invokes the block with the missing index as parameter - -Immutable::Vector - #fill - can replace a range of items at the beginning of a vector - can replace a range of items in the middle of a vector - can replace a range of items at the end of a vector - can replace all the items in a vector - can fill past the end of the vector - behaves like Array#fill, on a variety of inputs - with 1 argument - replaces all the items in the vector by default - with 2 arguments - replaces up to the end of the vector by default - when index and length are 0 - leaves the vector unmodified - when expanding a vector past boundary where vector trie needs to deepen - works the same - on a 1000-item vector - works the same - on a 1023-item vector - works the same - on a 1024-item vector - works the same - on a 1025-item vector - works the same - on a 2000-item vector - works the same - -Immutable::Vector - #first - on [] - returns nil - on ["A"] - returns "A" - on ["A", "B", "C"] - returns "A" - on 1..32 - returns 1 - -Immutable::Vector - #flat_map - with an empty vector - returns the flattened values as an Immutable::Vector - returns an Immutable::Vector - with a block that returns an empty vector - returns the flattened values as an Immutable::Vector - returns an Immutable::Vector - with a vector of one item - returns the flattened values as an Immutable::Vector - returns an Immutable::Vector - with a vector of multiple items - returns the flattened values as an Immutable::Vector - returns an Immutable::Vector - -Immutable::Vector - #flatten - recursively flattens nested vectors into containing vector - flattens nested arrays as well - leaves the original unmodified - with an integral argument - only flattens down to the specified depth - with an argument of zero - returns self - on a subclass - returns an instance of the subclass - on a vector with no nested vectors - returns an unchanged vector - on a Vector larger than 32 items initialized with Vector.new - returns an unchanged vector - -Immutable::Vector - #get - when empty - always returns nil - when not empty - with a positive index - within the absolute bounds of the vector - returns the value at the specified index from the head - outside the absolute bounds of the vector - returns nil - with a negative index - within the absolute bounds of the vector - returns the value at the specified index from the tail - outside the absolute bounds of the vector - returns nil - on a 1-item vector - works correctly, even after various addings and removings - on a 10-item vector - works correctly, even after various addings and removings - on a 31-item vector - works correctly, even after various addings and removings - on a 32-item vector - works correctly, even after various addings and removings - on a 33-item vector - works correctly, even after various addings and removings - on a 1024-item vector - works correctly, even after various addings and removings - on a 1025-item vector - works correctly, even after various addings and removings - on a 2000-item vector - works correctly, even after various addings and removings - #at - when empty - always returns nil - when not empty - with a positive index - within the absolute bounds of the vector - returns the value at the specified index from the head - outside the absolute bounds of the vector - returns nil - with a negative index - within the absolute bounds of the vector - returns the value at the specified index from the tail - outside the absolute bounds of the vector - returns nil - on a 1-item vector - works correctly, even after various addings and removings - on a 10-item vector - works correctly, even after various addings and removings - on a 31-item vector - works correctly, even after various addings and removings - on a 32-item vector - works correctly, even after various addings and removings - on a 33-item vector - works correctly, even after various addings and removings - on a 1024-item vector - works correctly, even after various addings and removings - on a 1025-item vector - works correctly, even after various addings and removings - on a 2000-item vector - works correctly, even after various addings and removings - -Immutable::Vector - #group_by - returns a hash without default proc - with a block - on [] - returns [] - on [1] - returns [{true=>Immutable::Vector[1]}] - on [1, 2, 3, 4] - returns [{true=>Immutable::Vector[1, 3], false=>Immutable::Vector[2, 4]}] - without a block - on [] - returns [] - on [1] - returns [{1=>Immutable::Vector[1]}] - on [1, 2, 3, 4] - returns [{1=>Immutable::Vector[1], 2=>Immutable::Vector[2], 3=>Immutable::Vector[3], 4=>Immutable::Vector[4]}] - on an empty vector - returns an empty hash - from a subclass - returns an Hash whose values are instances of the subclass - -Immutable::Vector - #include? - on [] - returns false - on [] - returns false - on ["A"] - returns true - on ["A"] - returns false - on ["A"] - returns false - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns false - on ["A", "B", false] - returns true - on [2] - returns true - on [2] - returns true - on [2.0] - returns true - on [2.0] - returns true - #member? - on [] - returns false - on [] - returns false - on ["A"] - returns true - on ["A"] - returns false - on ["A"] - returns false - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns true - on ["A", "B", nil] - returns false - on ["A", "B", false] - returns true - on [2] - returns true - on [2] - returns true - on [2.0] - returns true - on [2.0] - returns true - -Immutable::Vector - #insert - can add items at the beginning of a vector - can add items in the middle of a vector - can add items at the end of a vector - can add items past the end of a vector - accepts a negative index, which counts back from the end of the vector - raises IndexError if a negative index is too great - works when adding an item past boundary when vector trie needs to deepen - works when adding to an empty Vector - has the right size and contents after many insertions - -Immutable::Vector - #inspect - with an empty array - returns its contents as a programmer-readable string - returns a string which can be eval'd to get back an equivalent vector - with a single item array - returns its contents as a programmer-readable string - returns a string which can be eval'd to get back an equivalent vector - with a multi-item array - returns its contents as a programmer-readable string - returns a string which can be eval'd to get back an equivalent vector - from a subclass - returns its contents as a programmer-readable string - returns a string which can be eval'd to get back an equivalent vector - -Immutable::Vector - #join - with a separator - on [] - preserves the original - returns "" - on ["A"] - preserves the original - returns "A" - on ["A", "B", "C"] - preserves the original - returns "A|B|C" - without a separator - on [] - preserves the original - returns "" - on ["A"] - preserves the original - returns "A" - on ["A", "B", "C"] - preserves the original - returns "ABC" - without a separator (with global default separator set) - on ["A", "B", "C"] - returns "A**B**C" - -Immutable::Vector - #last - with an empty vector - returns the last item - with a single item vector - returns the last item - with a multi-item vector - returns the last item - with a 31-item vector - returns the last item - with a 32-item vector - returns the last item - with a 33-item vector - returns the last item - with a 1023-item vector - returns the last item - with a 1024-item vector - returns the last item - with a 1025-item vector - returns the last item - -Immutable::Vector - #length - with an empty vector - returns the values - with a single item vector - returns the values - with a multi-item vector - returns the values - with a 31-item vector - returns the values - with a 32-item vector - returns the values - with a 33-item vector - returns the values - with a 1023-item vector - returns the values - with a 1024-item vector - returns the values - with a 1025-item vector - returns the values - -Immutable::Vector - #<< - with a empty array adding a single item - preserves the original - ltlts the item to the vector - with a single-item array adding a different item - preserves the original - ltlts the item to the vector - with a single-item array adding a duplicate item - preserves the original - ltlts the item to the vector - with a 31-item vector adding a different item - preserves the original - ltlts the item to the vector - with a 32-item vector adding a different item - preserves the original - ltlts the item to the vector - with a 33-item vector adding a different item - preserves the original - ltlts the item to the vector - with a 1023-item vector adding a different item - preserves the original - ltlts the item to the vector - with a 1024-item vector adding a different item - preserves the original - ltlts the item to the vector - with a 1025-item vector adding a different item - preserves the original - ltlts the item to the vector - from a subclass - returns an instance of the subclass - -Immutable::Vector - #map - when empty - returns self - when not empty - with a block - preserves the original values - returns a new vector with the mapped values - with no block - returns an Enumerator - from a subclass - returns an instance of the subclass - on a large vector - works - #collect - when empty - returns self - when not empty - with a block - preserves the original values - returns a new vector with the mapped values - with no block - returns an Enumerator - from a subclass - returns an instance of the subclass - on a large vector - works - -Immutable::Vector - #marshal_dump/#marshal_load - can survive dumping and loading into a new process - is still possible to find items by index after loading - -Immutable::Vector - #max - with a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - without a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "San" - -Immutable::Vector - #min - with a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ni" - without a block - on [] - returns nil - on ["A"] - returns "A" - on ["Ichi", "Ni", "San"] - returns "Ichi" - -Immutable::Vector - #* - raises a TypeError if passed nil - raises an ArgumentError if passed no arguments - with a String argument - acts just like #join - with an Integer argument - concatenates n copies of the array - raises an ArgumentError if integer is negative - works on large vectors - with a subclass of Vector - returns an instance of the subclass - -Immutable::Vector - .new - accepts a single enumerable argument and creates a new vector - makes a defensive copy of a non-frozen mutable Array passed in - is amenable to overriding of #initialize - from a subclass - returns a frozen instance of the subclass - .[] - accepts a variable number of items and creates a new vector - -Immutable::Vector - #partition - on [] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [1, 2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [2, 3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [3, 4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - on [4] - with a block - preserves the original - returns a frozen array with two items - correctly identifies the matches - correctly identifies the remainder - without a block - returns an Enumerator - -Immutable::Vector - #permutation - handles duplicate elements correctly - leaves the original unmodified - behaves like Array#permutation - without a block or arguments - returns an Enumerator of all permutations - without a block, but with integral argument - returns an Enumerator of all permutations of given length - with a block - returns self - and no argument - yields all permutations - and an integral argument - yields all permutations of the given length - on an empty vector - yields the empty permutation - with an argument of zero - yields the empty permutation - with a length greater than the size of the vector - yields no permutations - -Immutable::Vector - #pop - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns [] - on ["A", "B", "C"] - preserves the original - returns ["A", "B"] - on 1..32 - preserves the original - returns 1..31 - on 1..33 - preserves the original - returns 1..32 - -Immutable::Vector - #product - when passed no arguments - multiplies all items in vector - when passed one or more vectors - when passed a block - yields an array for each combination of items from the vectors - returns self - when not passed a block - returns the cartesian product in an array - when one of the arguments is empty - returns an empty array - when the receiver is empty - returns an empty array - when passed one or more Arrays - also calculates the cartesian product correctly - -Immutable::Vector - #reduce - on [] - with an initial value of 10 - and a block - returns 10 - on [1] - with an initial value of 10 - and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 - and a block - returns 4 - on [] - with no initial value - and a block - returns nil - on [1] - with no initial value - and a block - returns 1 - on [1, 2, 3] - with no initial value - and a block - returns -4 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - #inject - on [] - with an initial value of 10 - and a block - returns 10 - on [1] - with an initial value of 10 - and a block - returns 9 - on [1, 2, 3] - with an initial value of 10 - and a block - returns 4 - on [] - with no initial value - and a block - returns nil - on [1] - with no initial value - and a block - returns 1 - on [1, 2, 3] - with no initial value - and a block - returns -4 - with no block and a symbol argument - uses the symbol as the name of a method to reduce with - with no block and a string argument - uses the string as the name of a method to reduce with - -Immutable::Vector - #reject - works with a variety of inputs - on [] - with a block - returns [] - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B", "C"] - without a block - returns an Enumerator - on ["A", "b", "C"] - with a block - returns ["A", "C"] - without a block - returns an Enumerator - on ["a", "b", "c"] - with a block - returns [] - without a block - returns an Enumerator - #delete_if - works with a variety of inputs - on [] - with a block - returns [] - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B", "C"] - without a block - returns an Enumerator - on ["A", "b", "C"] - with a block - returns ["A", "C"] - without a block - returns an Enumerator - on ["a", "b", "c"] - with a block - returns [] - without a block - returns an Enumerator - -Immutable::Vector - #repeated_combination - leaves the original unmodified - behaves like Array#repeated_combination - with no block - returns an Enumerator - with a block - returns self - with a negative argument - yields nothing and returns self - with a zero argument - yields an empty array - with a argument of 1 - yields each item in the vector, as single-item vectors - on an empty vector, with an argument greater than zero - yields nothing - with a positive argument, greater than 1 - yields all combinations of the given size (where a single element can appear more than once in a row) - -Immutable::Vector - #repeated_permutation - handles duplicate elements correctly - allows permutations larger than the number of elements - leaves the original unmodified - behaves like Array#repeated_permutation - without a block - and without argument - returns an Enumerator of all repeated permutations - with an integral argument - returns an Enumerator of all repeated permutations of the given length - with a block - returns self - on an empty vector - yields the empty permutation - with an argument of zero - yields the empty permutation - with no argument - yields all repeated permutations - with a positive integral argument - yields all repeated permutations of the given length - -Immutable::Vector - #reverse_each - on a 2-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 31-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 32-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 33-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 1000-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 1024-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 1025-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - on a 2000-item vector - with a block (internal iteration) - returns self - yields all items in the opposite order as #each - with no block - returns an Enumerator - -Immutable::Vector - #reverse - on [] - returns [] - on [1] - returns [1] - on [1, 2] - returns [2, 1] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32] - returns [32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33] - returns [33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100] - returns [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] - on [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024] - returns [1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001, 1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980, 979, 978, 977, 976, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] - -Immutable::Vector - #rindex - when passed an object present in the vector - returns the last index where the object is present - when passed an object not present in the vector - returns nil - with a block - returns the last index of an object which the predicate is true for - without an argument OR block - returns an Enumerator - -Immutable::Vector - #rotate - leaves the original unmodified - when passed no argument - returns a new vector with the first element moved to the end - with an integral argument n - returns a new vector with the first (n % size) elements moved to the end - with a floating-point argument n - coerces the argument to integer using to_int - with a non-numeric argument - raises a TypeError - with an argument of zero - returns self - with an argument equal to the vector's size - returns self - on a 31-item vector - behaves like Array#rotate - on a 32-item vector - behaves like Array#rotate - on a 33-item vector - behaves like Array#rotate - on a 1000-item vector - behaves like Array#rotate - on a 1023-item vector - behaves like Array#rotate - on a 1024-item vector - behaves like Array#rotate - on a 1025-item vector - behaves like Array#rotate - from a subclass - returns an instance of the subclass - -Immutable::Vector - #sample - returns a randomly chosen item - -Immutable::Vector - #select - works with a variety of inputs - with a block - preserves the original - returns a vector with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns an empty vector - on an empty vector - returns self - from a subclass - returns an instance of the subclass - #find_all - works with a variety of inputs - with a block - preserves the original - returns a vector with the matching values - with no block - returns an Enumerator - when nothing matches - preserves the original - returns an empty vector - on an empty vector - returns self - from a subclass - returns an instance of the subclass - -Immutable::Vector - #set - when empty -WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match when Ruby raises a `NoMethodError`, `NameError` or `ArgumentError`, potentially allowing the expectation to pass without even executing the method you are intending to call. Actual error raised was #. Instead consider providing a specific error class or message. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /build/reproducible-path/ruby-immutable-ruby-0.1.0/spec/lib/immutable/vector/set_spec.rb:11:in `block (4 levels) in '. - raises an error for index -1 - allows indexes 0 and 1 to be set - when not empty - with a block - and a positive index - within the absolute bounds of the vector - passes the current value to the block - replaces the value with the result of the block - supports to_proc methods - just past the end of the vector - passes nil to the block and adds a new value - further outside the bounds of the vector - passes nil to the block, fills up missing nils, and adds a new value - and a negative index - within the absolute bounds of the vector - passes the current value to the block - replaces the value with the result of the block - supports to_proc methods - outside the absolute bounds of the vector -WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match when Ruby raises a `NoMethodError`, `NameError` or `ArgumentError`, potentially allowing the expectation to pass without even executing the method you are intending to call. Actual error raised was #. Instead consider providing a specific error class or message. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /build/reproducible-path/ruby-immutable-ruby-0.1.0/spec/lib/immutable/vector/set_spec.rb:75:in `block (7 levels) in '. - raises an error - with a value - and a positive index - within the absolute bounds of the vector - preserves the original - sets the new value at the specified index - just past the end of the vector - adds a new value - outside the absolute bounds of the vector - fills up with nils - with a negative index - preserves the original - sets the new value at the specified index - outside the absolute bounds of the vector -WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match when Ruby raises a `NoMethodError`, `NameError` or `ArgumentError`, potentially allowing the expectation to pass without even executing the method you are intending to call. Actual error raised was #. Instead consider providing a specific error class or message. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /build/reproducible-path/ruby-immutable-ruby-0.1.0/spec/lib/immutable/vector/set_spec.rb:125:in `block (6 levels) in '. - raises an error - from a subclass - returns an instance of the subclass - on a 10-item vector - works correctly - on a 31-item vector - works correctly - on a 32-item vector - works correctly - on a 33-item vector - works correctly - on a 1000-item vector - works correctly - on a 1023-item vector - works correctly - on a 1024-item vector - works correctly - on a 1025-item vector - works correctly - on a 2000-item vector - works correctly - with an identical value to an existing item - on a 1-item vector - returns self - on a 2-item vector - returns self - on a 5-item vector - returns self - on a 31-item vector - returns self - on a 32-item vector - returns self - on a 33-item vector - returns self - on a 100-item vector - returns self - on a 200-item vector - returns self - -Immutable::Vector - #shift - on [] - preserves the original - returns [] - on ["A"] - preserves the original - returns [] - on ["A", "B", "C"] - preserves the original - returns ["B", "C"] - on 1..31 - preserves the original - returns 2..31 - on 1..32 - preserves the original - returns 2..32 - on 1..33 - preserves the original - returns 2..33 - -Immutable::Vector - #shuffle - returns the same values, in a usually different order - leaves the original unchanged - from a subclass - returns an instance of the subclass - on a 32-item vector - works correctly - on a 33-item vector - works correctly - on a 1023-item vector - works correctly - on a 1024-item vector - works correctly - on a 1025-item vector - works correctly - -Immutable::Vector - #slice - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the vector - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed a subclass of Range - works the same as with a Range - on a subclass of Vector - with index and count or a range, returns an instance of the subclass - #[] - when passed a positive integral index - returns the element at that index - leaves the original unchanged - when passed a negative integral index - returns the element which is number (index.abs) counting from the end of the vector - when passed a positive integral index and count - returns 'count' elements starting from 'index' - leaves the original unchanged - when passed a negative integral index and count - returns 'count' elements, starting from index which is number 'index.abs' counting from the end of the array - when passed a Range - returns the elements whose indexes are within the given Range - leaves the original unchanged - when passed a subclass of Range - works the same as with a Range - on a subclass of Vector - with index and count or a range, returns an instance of the subclass - -Immutable::Vector - #sort - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - on a 10-item vector - behaves like Arraysort - on a 31-item vector - behaves like Arraysort - on a 32-item vector - behaves like Arraysort - on a 33-item vector - behaves like Arraysort - on a 1023-item vector - behaves like Arraysort - on a 1024-item vector - behaves like Arraysort - on a 1025-item vector - behaves like Arraysort - #sort_by - on [] - with a block - preserves the original - returns [] - without a block - preserves the original - returns [] - on ["A"] - with a block - preserves the original - returns ["A"] - without a block - preserves the original - returns ["A"] - on ["Ichi", "Ni", "San"] - with a block - preserves the original - returns ["Ni", "San", "Ichi"] - without a block - preserves the original - returns ["Ichi", "Ni", "San"] - on a 10-item vector - behaves like Arraysort_by - on a 31-item vector - behaves like Arraysort_by - on a 32-item vector - behaves like Arraysort_by - on a 33-item vector - behaves like Arraysort_by - on a 1023-item vector - behaves like Arraysort_by - on a 1024-item vector - behaves like Arraysort_by - on a 1025-item vector - behaves like Arraysort_by - -Immutable::Vector - #sum - on [] - returns 0 - on [2] - returns 2 - on [1, 3, 5, 7, 11] - returns 27 - -Immutable::Vector - #take - 10 from [] - preserves the original - returns [] - 10 from ["A"] - preserves the original - returns ["A"] - 0 from ["A", "B", "C"] - preserves the original - returns [] - 2 from ["A", "B", "C"] - preserves the original - returns ["A", "B"] - 1 from 1..32 - preserves the original - returns [1] - 32 from 1..33 - preserves the original - returns 1..32 - 40 from 1..100 - preserves the original - returns 1..40 - when number of elements specified is identical to size - returns self - when number of elements specified is bigger than size - returns self - -Immutable::Vector - #take_while - on [] - with a block - returns [] - preserves the original - without a block - returns an Enumerator - on ["A"] - with a block - returns ["A"] - preserves the original - without a block - returns an Enumerator - on ["A", "B", "C"] - with a block - returns ["A", "B"] - preserves the original - without a block - returns an Enumerator - -Immutable::Vector - #to_a - with an empty vector - returns the values - with an single item vector - returns the values - with an multi-item vector - returns the values - with a 10-item vector - returns the values - with a 31-item vector - returns the values - with a 32-item vector - returns the values - with a 33-item vector - returns the values - with a 1000-item vector - returns the values - with a 1023-item vector - returns the values - with a 1024-item vector - returns the values - with a 1025-item vector - returns the values - -Immutable::Vector - #to_ary - converts using block parameters - converts using method arguments - converts using splat - -Immutable::Vector - #to_list - on [] - returns a list - the returned list - has the correct length - contains all values - on ["A"] - returns a list - the returned list - has the correct length - contains all values - on ["A", "B", "C"] - returns a list - the returned list - has the correct length - contains all values - -Immutable::Vector - #to_set - on [] - returns a set with the same values - on ["A"] - returns a set with the same values - on ["A", "B", "C"] - returns a set with the same values - on 1..10 - returns a set with the same values - on 1..32 - returns a set with the same values - on 1..33 - returns a set with the same values - on 1..1000 - returns a set with the same values - -Immutable::Vector - #transpose - takes a vector of vectors and transposes rows and columns - raises an IndexError if the vectors are not of the same length - also works on Vectors of Arrays - on 10-item vectors - behaves like Array#transpose - on 31-item vectors - behaves like Array#transpose - on 32-item vectors - behaves like Array#transpose - on 33-item vectors - behaves like Array#transpose - on 1000-item vectors - behaves like Array#transpose - on 1023-item vectors - behaves like Array#transpose - on 1024-item vectors - behaves like Array#transpose - on 1025-item vectors - behaves like Array#transpose - on 2000-item vectors - behaves like Array#transpose - on a subclass of Vector - returns instances of the subclass - if an item does not respond to #size and #[] - raises TypeError - -Immutable::Vector - #uniq - returns a vector with no duplicates - leaves the original unmodified - uses #eql? semantics - also uses #hash when determining which values are duplicates - keeps the first of each group of duplicate values - when passed a block - uses the return value of the block to determine which items are duplicate - on a vector with no duplicates - returns an unchanged vector - if the vector has more than 32 elements and is initialized with Vector.new - returns an unchanged vector - on a 10-item vector - behaves like Array#uniq - on a 31-item vector - behaves like Array#uniq - on a 32-item vector - behaves like Array#uniq - on a 33-item vector - behaves like Array#uniq - on a 1000-item vector - behaves like Array#uniq - on a 1023-item vector - behaves like Array#uniq - on a 1024-item vector - behaves like Array#uniq - on a 1025-item vector - behaves like Array#uniq - on a 2000-item vector - behaves like Array#uniq - from a subclass - returns an instance of the subclass - -Immutable::Vector - #unshift - on [] with "A" - preserves the original - returns ["A"] - on ["A"] with "B" - preserves the original - returns ["B", "A"] - on ["A"] with "A" - preserves the original - returns ["A", "A"] - on ["A", "B", "C"] with "D" - preserves the original - returns ["D", "A", "B", "C"] - on 1..31 with 0 - preserves the original - returns 0..31 - on 1..32 with 0 - preserves the original - returns 0..32 - on 1..33 with 0 - preserves the original - returns 0..33 - -Immutable::Vector - #update_in - with one level on existing key - passes the value to the block - replaces the value with the result of the block - should preserve the original - with multi-level vectors on existing keys - passes the value to the block - replaces the value with the result of the block - should preserve the original - with multi-level creating sub-hashes when keys don't exist - passes nil to the block - creates subhashes on the way to set the value - with multi-level including hash with existing keys - passes the value to the block - replaces the value with the result of the block - should preserve the original - with empty key_path - raises ArguemntError - -Immutable::Vector - #values_at - accepts any number of indices, and returns a vector of items at those indices - when passed invalid indices - fills in with nils - when passed no arguments - returns an empty vector - from a subclass - returns an instance of the subclass - -Immutable::Vector - #zip - with a block - yields arrays of one corresponding element from each input sequence - fills in the missing values with nils - returns nil - can handle multiple inputs, of different classes - without a block - returns a vector of arrays (one corresponding element from each input sequence) - on 10-item vectors - behaves like Array#zip - on 31-item vectors - behaves like Array#zip - on 32-item vectors - behaves like Array#zip - on 33-item vectors - behaves like Array#zip - on 1000-item vectors - behaves like Array#zip - on 1023-item vectors - behaves like Array#zip - on 1024-item vectors - behaves like Array#zip - on 1025-item vectors - behaves like Array#zip - from a subclass - returns an instance of the subclass - -Immutable - Hash - can be loaded separately - Set - can be loaded separately - Vector - can be loaded separately - List - can be loaded separately - SortedSet - can be loaded separately - Deque - can be loaded separately - -Top 10 slowest examples (7.17 seconds, 29.5% of total time): - Immutable::List#each_chunk on a really big list doesn't run out of stack - 1.35 seconds ./spec/lib/immutable/list/each_slice_spec.rb:7 - Immutable::List#each_slice on a really big list doesn't run out of stack - 1.18 seconds ./spec/lib/immutable/list/each_slice_spec.rb:7 - Immutable::List ensures each node of a lazy list will only be realized on ONE thread, even when accessed by multiple threads - 0.88586 seconds ./spec/lib/immutable/list/multithreading_spec.rb:5 - Immutable::Set#find_all works on a large set, with many combinations of input - 0.59335 seconds ./spec/lib/immutable/set/select_spec.rb:59 - Immutable::Set#select works on a large set, with many combinations of input - 0.56351 seconds ./spec/lib/immutable/set/select_spec.rb:59 - Immutable::List#hash on a really big list doesn't run out of stack - 0.54339 seconds ./spec/lib/immutable/list/hash_spec.rb:6 - Immutable::List#eql? on a really big list doesn't run out of stack - 0.54091 seconds ./spec/lib/immutable/list/eql_spec.rb:6 - Immutable::List#partition calls the passed block only once for each item, even with multiple threads - 0.52406 seconds ./spec/lib/immutable/list/partition_spec.rb:38 - Immutable::List#all? on a really big list doesn't run out of stack - 0.51603 seconds ./spec/lib/immutable/list/all_spec.rb:8 - Immutable::Hash#select works on a large hash, with many combinations of input - 0.47507 seconds ./spec/lib/immutable/hash/select_spec.rb:43 - -Top 10 slowest example groups: - Immutable::Deque - 0.37827 seconds average (0.75654 seconds / 2 examples) ./spec/lib/immutable/deque/marshal_spec.rb:3 - Immutable::Hash - 0.37744 seconds average (0.75487 seconds / 2 examples) ./spec/lib/immutable/hash/marshal_spec.rb:3 - Immutable::Set - 0.37656 seconds average (0.75312 seconds / 2 examples) ./spec/lib/immutable/set/marshal_spec.rb:3 - Immutable::Vector - 0.37583 seconds average (0.75166 seconds / 2 examples) ./spec/lib/immutable/vector/marshal_spec.rb:3 - Immutable::List - 0.33826 seconds average (1.01 seconds / 3 examples) ./spec/lib/immutable/list/multithreading_spec.rb:4 - Immutable - 0.25604 seconds average (1.54 seconds / 6 examples) ./spec/lib/load_spec.rb:6 - Immutable::SortedSet - 0.25174 seconds average (0.75523 seconds / 3 examples) ./spec/lib/immutable/sorted_set/marshal_spec.rb:3 - Immutable::List - 0.18664 seconds average (0.55991 seconds / 3 examples) ./spec/lib/immutable/list/hash_spec.rb:3 - Immutable::Hash - 0.11075 seconds average (1.11 seconds / 10 examples) ./spec/lib/immutable/hash/size_spec.rb:3 - Immutable::List - 0.07977 seconds average (2.55 seconds / 32 examples) ./spec/lib/immutable/list/each_slice_spec.rb:3 - -Finished in 24.33 seconds (files took 3.3 seconds to load) -4608 examples, 0 failures - - -┌──────────────────────────────────────────────────────────────────────────────┐ -│ dh_ruby --install finished │ -└──────────────────────────────────────────────────────────────────────────────┘ - - dh_installdocs -O--buildsystem=ruby - dh_ruby_fixdocs -O--buildsystem=ruby - dh_installchangelogs -O--buildsystem=ruby - dh_installsystemduser -O--buildsystem=ruby - dh_perl -O--buildsystem=ruby - dh_link -O--buildsystem=ruby - dh_strip_nondeterminism -O--buildsystem=ruby - dh_compress -X.rb -O--buildsystem=ruby - dh_fixperms -O--buildsystem=ruby - dh_missing -O--buildsystem=ruby - dh_ruby_fixdepends -O--buildsystem=ruby - dh_installdeb -O--buildsystem=ruby - dh_gencontrol -O--buildsystem=ruby -dpkg-gencontrol: warning: Depends field of package ruby-immutable-ruby: substitution variable ${shlibs:Depends} used, but is not defined - dh_md5sums -O--buildsystem=ruby - dh_builddeb -O--buildsystem=ruby -dpkg-deb: building package 'ruby-immutable-ruby' in '../ruby-immutable-ruby_0.1.0-2_all.deb'. - dpkg-genbuildinfo --build=binary -O../ruby-immutable-ruby_0.1.0-2_armhf.buildinfo - dpkg-genchanges --build=binary -O../ruby-immutable-ruby_0.1.0-2_armhf.changes -dpkg-genchanges: info: binary-only upload (no source code included) - dpkg-source --after-build . -dpkg-buildpackage: info: binary-only upload (no source included) -dpkg-genchanges: info: not including original source code in upload +/usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed +ERROR: Test "ruby3.1" failed. Exiting. +dh_auto_install: error: dh_ruby --install /build/reproducible-path/ruby-immutable-ruby-0.1.0/debian/ruby-immutable-ruby returned exit code 1 +make: *** [debian/rules:7: binary] Error 25 +dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I: copying local configuration +E: Failed autobuilding of package +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/C01_cleanup starting +debug output: disk usage on i-capture-the-hostname at Tue Apr 16 10:18:57 UTC 2024 +Filesystem Size Used Avail Use% Mounted on +tmpfs 2.0G 0 2.0G 0% /dev/shm + +I: user script /srv/workspace/pbuilder/20061/tmp/hooks/C01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/20888 and its subdirectories -I: Current time: Mon Apr 15 22:11:30 -12 2024 -I: pbuilder-time-stamp: 1713262290 +I: removing directory /srv/workspace/pbuilder/20061 and its subdirectories