Diff of the two buildlogs: -- --- b1/build.log 2021-07-10 23:17:21.980754973 +0000 +++ b2/build.log 2021-07-10 23:18:25.746352544 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Sat Jul 10 11:12:44 -12 2021 -I: pbuilder-time-stamp: 1625958764 +I: Current time: Sat Aug 13 19:40:24 +14 2022 +I: pbuilder-time-stamp: 1660369224 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration @@ -17,8 +17,8 @@ I: copying [./ruby-rubocop-ast_0.3.0+dfsg-1.debian.tar.xz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' -gpgv: keyblock resource '/tmp/dpkg-verify-sig.fd_LzI0D/trustedkeys.kbx': General error -gpgv: Signature made Tue Aug 18 17:57:28 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.wOf_AtG6/trustedkeys.kbx': General error +gpgv: Signature made Wed Aug 19 19:57:28 2020 +14 gpgv: using RSA key 6C9D10484A9AE4CC385F7C71823E967606C34B96 gpgv: issuer "utkarsh@debian.org" gpgv: Can't check signature: No public key @@ -30,137 +30,171 @@ dpkg-source: info: applying 0001-gemspec-drop-git-usage.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/25249/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/43499/tmp/hooks/D01_modify_environment starting +debug: Running on ionos6-i386. +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 +Removing 'diversion of /bin/sh to /bin/sh.distrib by dash' +Adding 'diversion of /bin/sh to /bin/sh.distrib by bash' +Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' +Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by 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/43499/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/43499/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=10' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='i386' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="1" [2]="4" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.1.4(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=18' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='c438bbc817a040eda20e2f1563c0f7d4' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - 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='25249' - PS1='# ' - PS2='> ' + INVOCATION_ID=be4b23145caa4dc198610b184235ad70 + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + 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=43499 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/tmp.7nNaoTXEWb/pbuilderrc_PJgx --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.7nNaoTXEWb/b1 --logfile b1/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://78.137.99.97:3128' + 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/tmp.7nNaoTXEWb/pbuilderrc_gcvN --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.7nNaoTXEWb/b2 --logfile b2/build.log --extrapackages usrmerge ruby-rubocop-ast_0.3.0+dfsg-1.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://85.184.249.68:3128 I: uname -a - Linux ionos12-i386 4.19.0-17-686-pae #1 SMP Debian 4.19.194-2 (2021-06-21) i686 GNU/Linux + Linux i-capture-the-hostname 4.19.0-17-amd64 #1 SMP Debian 4.19.194-2 (2021-06-21) x86_64 GNU/Linux I: ls -l /bin - total 5792 - -rwxr-xr-x 1 root root 1367848 Jun 21 14:25 bash - -rwxr-xr-x 3 root root 38280 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 38280 Jul 20 2020 bzcat - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Jul 20 2020 bzdiff - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4877 Sep 4 2019 bzexe - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Jul 20 2020 bzgrep - -rwxr-xr-x 3 root root 38280 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 17768 Jul 20 2020 bzip2recover - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Jul 20 2020 bzmore - -rwxr-xr-x 1 root root 38824 Sep 22 2020 cat - -rwxr-xr-x 1 root root 71624 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 67528 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 75752 Sep 22 2020 chown - -rwxr-xr-x 1 root root 157960 Sep 22 2020 cp - -rwxr-xr-x 1 root root 128724 Dec 10 2020 dash - -rwxr-xr-x 1 root root 124904 Sep 22 2020 date - -rwxr-xr-x 1 root root 92172 Sep 22 2020 dd - -rwxr-xr-x 1 root root 100752 Sep 22 2020 df - -rwxr-xr-x 1 root root 153964 Sep 22 2020 dir - -rwxr-xr-x 1 root root 83644 Feb 7 02:38 dmesg - lrwxrwxrwx 1 root root 8 Nov 6 2019 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Nov 6 2019 domainname -> hostname - -rwxr-xr-x 1 root root 34664 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 34664 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 71928 Feb 7 02:38 findmnt - -rwsr-xr-x 1 root root 30112 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 210488 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 11:30 gzexe - -rwxr-xr-x 1 root root 100952 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 21916 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 83980 Sep 22 2020 ln - -rwxr-xr-x 1 root root 55572 Feb 7 2020 login - -rwxr-xr-x 1 root root 153964 Sep 22 2020 ls - -rwxr-xr-x 1 root root 153124 Feb 7 02:38 lsblk - -rwxr-xr-x 1 root root 96328 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 79912 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 47048 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 58920 Feb 7 02:38 more - -rwsr-xr-x 1 root root 50720 Feb 7 02:38 mount - -rwxr-xr-x 1 root root 13856 Feb 7 02:38 mountpoint - -rwxr-xr-x 1 root root 157996 Sep 22 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 03:38 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 38824 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Jun 21 14:25 rbash -> bash - -rwxr-xr-x 1 root root 46984 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 75720 Sep 22 2020 rm - -rwxr-xr-x 1 root root 46984 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 22292 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 125036 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Jul 8 20:43 sh -> dash - -rwxr-xr-x 1 root root 34696 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 83880 Sep 22 2020 stty - -rwsr-xr-x 1 root root 79396 Feb 7 02:38 su - -rwxr-xr-x 1 root root 34696 Sep 22 2020 sync - -rwxr-xr-x 1 root root 602584 Feb 16 21:55 tar - -rwxr-xr-x 1 root root 13860 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 108520 Sep 22 2020 touch - -rwxr-xr-x 1 root root 34664 Sep 22 2020 true - -rwxr-xr-x 1 root root 17768 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 30236 Feb 7 02:38 umount - -rwxr-xr-x 1 root root 34664 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 153964 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 63024 Feb 7 02:38 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 11:30 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 11:30 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 11:30 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 11:30 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 11:30 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 11:30 zless - -rwxr-xr-x 1 root root 1842 Mar 2 11:30 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 11:30 znew -I: user script /srv/workspace/pbuilder/25249/tmp/hooks/D02_print_environment finished + total 5776 + -rwxr-xr-x 1 root root 1367848 Jun 22 2021 bash + -rwxr-xr-x 3 root root 38280 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 38280 Jul 21 2020 bzcat + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Jul 21 2020 bzdiff + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4877 Sep 5 2019 bzexe + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Jul 21 2020 bzgrep + -rwxr-xr-x 3 root root 38280 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 17768 Jul 21 2020 bzip2recover + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Jul 21 2020 bzmore + -rwxr-xr-x 1 root root 38824 Sep 23 2020 cat + -rwxr-xr-x 1 root root 71624 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 67528 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 75752 Sep 23 2020 chown + -rwxr-xr-x 1 root root 157960 Sep 23 2020 cp + -rwxr-xr-x 1 root root 128724 Dec 11 2020 dash + -rwxr-xr-x 1 root root 124904 Sep 23 2020 date + -rwxr-xr-x 1 root root 92172 Sep 23 2020 dd + -rwxr-xr-x 1 root root 100752 Sep 23 2020 df + -rwxr-xr-x 1 root root 153964 Sep 23 2020 dir + -rwxr-xr-x 1 root root 83644 Feb 8 2021 dmesg + lrwxrwxrwx 1 root root 8 Nov 8 2019 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Nov 8 2019 domainname -> hostname + -rwxr-xr-x 1 root root 34664 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 34664 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 71928 Feb 8 2021 findmnt + -rwsr-xr-x 1 root root 30112 Feb 27 2021 fusermount + -rwxr-xr-x 1 root root 210488 Nov 10 2020 grep + -rwxr-xr-x 2 root root 2346 Mar 3 2021 gunzip + -rwxr-xr-x 1 root root 6376 Mar 3 2021 gzexe + -rwxr-xr-x 1 root root 100952 Mar 3 2021 gzip + -rwxr-xr-x 1 root root 21916 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 83980 Sep 23 2020 ln + -rwxr-xr-x 1 root root 55572 Feb 8 2020 login + -rwxr-xr-x 1 root root 153964 Sep 23 2020 ls + -rwxr-xr-x 1 root root 153124 Feb 8 2021 lsblk + -rwxr-xr-x 1 root root 96328 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 79912 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 47048 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 58920 Feb 8 2021 more + -rwsr-xr-x 1 root root 50720 Feb 8 2021 mount + -rwxr-xr-x 1 root root 13856 Feb 8 2021 mountpoint + -rwxr-xr-x 1 root root 157996 Sep 23 2020 mv + lrwxrwxrwx 1 root root 8 Nov 8 2019 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 19 2021 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 38824 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Jun 22 2021 rbash -> bash + -rwxr-xr-x 1 root root 46984 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 75720 Sep 23 2020 rm + -rwxr-xr-x 1 root root 46984 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 22292 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 125036 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Aug 13 19:40 sh -> bash + lrwxrwxrwx 1 root root 4 Aug 12 05:48 sh.distrib -> dash + -rwxr-xr-x 1 root root 34696 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 83880 Sep 23 2020 stty + -rwsr-xr-x 1 root root 79396 Feb 8 2021 su + -rwxr-xr-x 1 root root 34696 Sep 23 2020 sync + -rwxr-xr-x 1 root root 602584 Feb 17 2021 tar + -rwxr-xr-x 1 root root 13860 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 108520 Sep 23 2020 touch + -rwxr-xr-x 1 root root 34664 Sep 23 2020 true + -rwxr-xr-x 1 root root 17768 Feb 27 2021 ulockmgr_server + -rwsr-xr-x 1 root root 30236 Feb 8 2021 umount + -rwxr-xr-x 1 root root 34664 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 2021 uncompress + -rwxr-xr-x 1 root root 153964 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 63024 Feb 8 2021 wdctl + lrwxrwxrwx 1 root root 8 Nov 8 2019 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Mar 3 2021 zcat + -rwxr-xr-x 1 root root 1678 Mar 3 2021 zcmp + -rwxr-xr-x 1 root root 5880 Mar 3 2021 zdiff + -rwxr-xr-x 1 root root 29 Mar 3 2021 zegrep + -rwxr-xr-x 1 root root 29 Mar 3 2021 zfgrep + -rwxr-xr-x 1 root root 2081 Mar 3 2021 zforce + -rwxr-xr-x 1 root root 7585 Mar 3 2021 zgrep + -rwxr-xr-x 1 root root 2206 Mar 3 2021 zless + -rwxr-xr-x 1 root root 1842 Mar 3 2021 zmore + -rwxr-xr-x 1 root root 4553 Mar 3 2021 znew +I: user script /srv/workspace/pbuilder/43499/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -337,7 +371,7 @@ Get: 131 http://deb.debian.org/debian bullseye/main i386 ruby-rspec-mocks all 3.9.0c2e2m1s3-2 [81.4 kB] Get: 132 http://deb.debian.org/debian bullseye/main i386 ruby-rspec all 3.9.0c2e2m1s3-2 [8348 B] Get: 133 http://deb.debian.org/debian bullseye/main i386 ruby-whitequark-parser all 2.7.1.4-2 [394 kB] -Fetched 45.2 MB in 11s (3940 kB/s) +Fetched 45.2 MB in 1s (35.7 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package bsdextrautils. (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 ... 19675 files and directories currently installed.) @@ -893,8 +927,44 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +The following additional packages will be installed: + libfile-find-rule-perl libnumber-compare-perl libtext-glob-perl +The following NEW packages will be installed: + libfile-find-rule-perl libnumber-compare-perl libtext-glob-perl usrmerge +0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. +Need to get 59.5 kB of archives. +After this operation, 157 kB of additional disk space will be used. +Get:1 http://deb.debian.org/debian bullseye/main i386 libnumber-compare-perl all 0.03-1.1 [6956 B] +Get:2 http://deb.debian.org/debian bullseye/main i386 libtext-glob-perl all 0.11-1 [8888 B] +Get:3 http://deb.debian.org/debian bullseye/main i386 libfile-find-rule-perl all 0.34-1 [30.6 kB] +Get:4 http://deb.debian.org/debian bullseye/main i386 usrmerge all 25 [13.0 kB] +debconf: delaying package configuration, since apt-utils is not installed +Fetched 59.5 kB in 0s (3883 kB/s) +Selecting previously unselected package libnumber-compare-perl. +(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 ... 26973 files and directories currently installed.) +Preparing to unpack .../libnumber-compare-perl_0.03-1.1_all.deb ... +Unpacking libnumber-compare-perl (0.03-1.1) ... +Selecting previously unselected package libtext-glob-perl. +Preparing to unpack .../libtext-glob-perl_0.11-1_all.deb ... +Unpacking libtext-glob-perl (0.11-1) ... +Selecting previously unselected package libfile-find-rule-perl. +Preparing to unpack .../libfile-find-rule-perl_0.34-1_all.deb ... +Unpacking libfile-find-rule-perl (0.34-1) ... +Selecting previously unselected package usrmerge. +Preparing to unpack .../archives/usrmerge_25_all.deb ... +Unpacking usrmerge (25) ... +Setting up libtext-glob-perl (0.11-1) ... +Setting up libnumber-compare-perl (0.03-1.1) ... +Setting up libfile-find-rule-perl (0.34-1) ... +Setting up usrmerge (25) ... +The system has been successfully converted. +Processing triggers for man-db (2.9.4-2) ... +Not building database; man-db/auto-update is not 'true'. I: Building the package -I: Running cd /build/ruby-rubocop-ast-0.3.0+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b +I: Running cd /build/ruby-rubocop-ast-0.3.0+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b dpkg-buildpackage: info: source package ruby-rubocop-ast dpkg-buildpackage: info: source version 0.3.0+dfsg-1 dpkg-buildpackage: info: source distribution unstable @@ -925,7 +995,7 @@ dh_auto_install -O--buildsystem=ruby dh_ruby --install /build/ruby-rubocop-ast-0.3.0\+dfsg/debian/ruby-rubocop-ast dh_ruby --install -/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20210710-13785-h8aecw/gemspec +/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20220813-49574-14v92n3/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on parser (>= 2.7.1.4) is not recommended if parser is semantically versioned, use: @@ -935,7 +1005,7 @@ Name: rubocop-ast Version: 0.3.0 File: rubocop-ast-0.3.0.gem -/usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rubocop-ast/usr/share/rubygems-integration/all /tmp/d20210710-13785-h8aecw/rubocop-ast-0.3.0.gem +/usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rubocop-ast/usr/share/rubygems-integration/all /tmp/d20220813-49574-14v92n3/rubocop-ast-0.3.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/ruby-rubocop-ast-0.3.0+dfsg/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.3.0/lib/rubocop-ast.rb /build/ruby-rubocop-ast-0.3.0+dfsg/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.3.0/lib/rubocop/ast.rb @@ -1008,7 +1078,7 @@ rm -rf extensions cd gems/rubocop-ast-0.3.0 rm -f -chmod 644 lib/rubocop/ast.rb lib/rubocop/ast/processed_source.rb lib/rubocop/ast/ext/range.rb lib/rubocop/ast/node_pattern.rb lib/rubocop/ast/sexp.rb lib/rubocop/ast/token.rb lib/rubocop/ast/version.rb lib/rubocop/ast/node.rb lib/rubocop/ast/traversal.rb lib/rubocop/ast/node/float_node.rb lib/rubocop/ast/node/self_class_node.rb lib/rubocop/ast/node/when_node.rb lib/rubocop/ast/node/resbody_node.rb lib/rubocop/ast/node/next_node.rb lib/rubocop/ast/node/regexp_node.rb lib/rubocop/ast/node/range_node.rb lib/rubocop/ast/node/case_node.rb lib/rubocop/ast/node/return_node.rb lib/rubocop/ast/node/array_node.rb lib/rubocop/ast/node/ensure_node.rb lib/rubocop/ast/node/index_node.rb lib/rubocop/ast/node/while_node.rb lib/rubocop/ast/node/if_node.rb lib/rubocop/ast/node/alias_node.rb lib/rubocop/ast/node/and_node.rb lib/rubocop/ast/node/module_node.rb lib/rubocop/ast/node/def_node.rb lib/rubocop/ast/node/case_match_node.rb lib/rubocop/ast/node/keyword_splat_node.rb lib/rubocop/ast/node/indexasgn_node.rb lib/rubocop/ast/node/pair_node.rb lib/rubocop/ast/node/int_node.rb lib/rubocop/ast/node/defined_node.rb lib/rubocop/ast/node/for_node.rb lib/rubocop/ast/node/lambda_node.rb lib/rubocop/ast/node/block_node.rb lib/rubocop/ast/node/str_node.rb lib/rubocop/ast/node/forward_args_node.rb lib/rubocop/ast/node/args_node.rb lib/rubocop/ast/node/or_node.rb lib/rubocop/ast/node/symbol_node.rb lib/rubocop/ast/node/break_node.rb lib/rubocop/ast/node/yield_node.rb lib/rubocop/ast/node/class_node.rb lib/rubocop/ast/node/hash_node.rb lib/rubocop/ast/node/super_node.rb lib/rubocop/ast/node/until_node.rb lib/rubocop/ast/node/send_node.rb lib/rubocop/ast/node/mixin/predicate_operator_node.rb lib/rubocop/ast/node/mixin/modifier_node.rb lib/rubocop/ast/node/mixin/binary_operator_node.rb lib/rubocop/ast/node/mixin/method_identifier_predicates.rb lib/rubocop/ast/node/mixin/numeric_node.rb lib/rubocop/ast/node/mixin/collection_node.rb lib/rubocop/ast/node/mixin/conditional_node.rb lib/rubocop/ast/node/mixin/hash_element_node.rb lib/rubocop/ast/node/mixin/parameterized_node.rb lib/rubocop/ast/node/mixin/basic_literal_node.rb lib/rubocop/ast/node/mixin/method_dispatch_node.rb lib/rubocop/ast/builder.rb lib/rubocop-ast.rb +chmod 644 lib/rubocop-ast.rb lib/rubocop/ast/version.rb lib/rubocop/ast/processed_source.rb lib/rubocop/ast/node_pattern.rb lib/rubocop/ast/node/send_node.rb lib/rubocop/ast/node/while_node.rb lib/rubocop/ast/node/alias_node.rb lib/rubocop/ast/node/indexasgn_node.rb lib/rubocop/ast/node/for_node.rb lib/rubocop/ast/node/block_node.rb lib/rubocop/ast/node/array_node.rb lib/rubocop/ast/node/when_node.rb lib/rubocop/ast/node/mixin/basic_literal_node.rb lib/rubocop/ast/node/mixin/method_dispatch_node.rb lib/rubocop/ast/node/mixin/parameterized_node.rb lib/rubocop/ast/node/mixin/collection_node.rb lib/rubocop/ast/node/mixin/hash_element_node.rb lib/rubocop/ast/node/mixin/method_identifier_predicates.rb lib/rubocop/ast/node/mixin/modifier_node.rb lib/rubocop/ast/node/mixin/predicate_operator_node.rb lib/rubocop/ast/node/mixin/conditional_node.rb lib/rubocop/ast/node/mixin/binary_operator_node.rb lib/rubocop/ast/node/mixin/numeric_node.rb lib/rubocop/ast/node/resbody_node.rb lib/rubocop/ast/node/return_node.rb lib/rubocop/ast/node/regexp_node.rb lib/rubocop/ast/node/hash_node.rb lib/rubocop/ast/node/range_node.rb lib/rubocop/ast/node/lambda_node.rb lib/rubocop/ast/node/until_node.rb lib/rubocop/ast/node/case_node.rb lib/rubocop/ast/node/ensure_node.rb lib/rubocop/ast/node/defined_node.rb lib/rubocop/ast/node/def_node.rb lib/rubocop/ast/node/module_node.rb lib/rubocop/ast/node/str_node.rb lib/rubocop/ast/node/int_node.rb lib/rubocop/ast/node/float_node.rb lib/rubocop/ast/node/case_match_node.rb lib/rubocop/ast/node/symbol_node.rb lib/rubocop/ast/node/super_node.rb lib/rubocop/ast/node/break_node.rb lib/rubocop/ast/node/and_node.rb lib/rubocop/ast/node/forward_args_node.rb lib/rubocop/ast/node/yield_node.rb lib/rubocop/ast/node/pair_node.rb lib/rubocop/ast/node/args_node.rb lib/rubocop/ast/node/next_node.rb lib/rubocop/ast/node/index_node.rb lib/rubocop/ast/node/class_node.rb lib/rubocop/ast/node/or_node.rb lib/rubocop/ast/node/keyword_splat_node.rb lib/rubocop/ast/node/if_node.rb lib/rubocop/ast/node/self_class_node.rb lib/rubocop/ast/traversal.rb lib/rubocop/ast/node.rb lib/rubocop/ast/ext/range.rb lib/rubocop/ast/sexp.rb lib/rubocop/ast/builder.rb lib/rubocop/ast/token.rb lib/rubocop/ast.rb find lib/ -type d -empty -delete cd - cd - @@ -1031,757 +1101,1581 @@ warning: 2.7.1-compliant syntax, but you are running 2.7.3. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. -Randomized with seed 43662 +Randomized with seed 51987 -RuboCop::AST::CaseMatchNode - when using Ruby 2.7 or newer - #keyword - is expected to eq "case" - .new +RuboCop::AST::ModuleNode + #identifier + is expected to equal true + .new + is expected to equal true + #body + with a single expression body is expected to equal true - #else? - without an else statement - is expected to equal false - with an else statement - is expected to equal true - #each_in_pattern - when passed a block - yields all the conditions - when not passed a block - is expected to equal true - #else_branch - #else? - with an else statement - is expected to equal true - without an else statement - is expected to equal true - #in_pattern_branches - is expected to all be in pattern type - is expected to eq 3 + with a multi-expression body + is expected to equal true + with an empty body + is expected to equal nil -RuboCop::AST::SymbolNode - #value - is expected to eq :foo +RuboCop::AST::SelfClassNode + #identifier + is expected to equal true + #body + with an empty body + is expected to equal nil + with a single expression body + is expected to equal true + with a multi-expression body + is expected to equal true .new - with a symbol node + is expected to equal true + +RuboCop::AST::Ext::Range + #line_span + accepts an `exclude_end` keyword argument + returns the range of lines a range occupies + +RuboCop::AST::WhenNode + #each_condition + when not passed a block is expected to equal true + when passed a block + yields all the conditions + .new + is expected to equal true + #then? + with a then keyword + is expected to be truthy + without a then keyword + is expected to be falsey + #body + with a then keyword + is expected to equal true + without a then keyword + is expected to equal true + #branch_index + is expected to eq 0 + is expected to eq 2 + is expected to eq 1 + #conditions + with a single condition + is expected to eq 1 + is expected to all be literal + with a multiple conditions + is expected to all be literal + is expected to eq 3 -RuboCop::AST::FloatNode - #sign? - explicit negative float +RuboCop::AST::LambdaNode + #arguments + is expected to eq 2 + #receiver + is expected to eq nil + #method_name + is expected to eq :lambda + +RuboCop::AST::UntilNode + #inverse_keyword + is expected to eq "while" + #loop_keyword? + with a modifier until is expected to be truthy - explicit positive float + with a statement until is expected to be truthy - #value - is expected to eq 1.5 + #do? + without a do keyword + is expected to be falsey + with a do keyword + is expected to be truthy + #post_condition_loop? + with a statement until + is expected to be falsey + with a modifier until + is expected to be truthy + #keyword + is expected to eq "until" + .new + with a modifier until + is expected to equal true + with a statement until + is expected to equal true + +RuboCop::AST::EnsureNode .new + is expected to equal true + #body + is expected to equal true + +RuboCop::AST::ForNode + #collection + is expected to equal true + #loop_keyword? is expected to be truthy + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #void_context? + without a do keyword + is expected to be truthy + with a do keyword + is expected to be truthy + #keyword + is expected to eq "for" + #variable + is expected to equal true + #body + is expected to equal true + #post_condition_loop? + is expected to be falsey + .new + is expected to equal true + +RuboCop::AST::WhileNode + #keyword + is expected to eq "while" + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #inverse_keyword + is expected to eq "until" + .new + with a modifier while + is expected to equal true + with a statement while + is expected to equal true + #post_condition_loop? + with a statement while + is expected to be falsey + with a modifier while + is expected to be truthy + #loop_keyword? + with a statement while + is expected to be truthy + with a modifier while + is expected to be truthy + +RuboCop::AST::IfNode + #each_branch + when passed a block + yields all the branches + when not passed a block + is expected to equal true + #nested_conditional? + with nested conditionals in if clause + is expected to be truthy + with nested conditionals in else clause + is expected to be truthy + with nested ternary operators + when nested in the truthy branch + is expected to be truthy + when nested in the falsey branch + is expected to be truthy + with no nested conditionals + is expected to be falsey + with nested conditionals in elsif clause + is expected to be truthy + #inverse_keyword? + with an if statement + is expected to eq "unless" + with a ternary operator + is expected to eq "" + with an unless statement + is expected to eq "if" + #keyword + with an unless statement + is expected to eq "unless" + with a ternary operator + is expected to eq "" + with an if statement + is expected to eq "if" + #ternary? + with a ternary operator + is expected to be truthy + with an unless statement + is expected to be falsey + with an if statement + is expected to be falsey + #if? + with an unless statement + is expected to be falsey + with a ternary operator + is expected to be falsey + with an if statement + is expected to be truthy + #elsif_conditional? + with nested ternary operators + when nested in the truthy branch + is expected to be falsey + when nested in the falsey branch + is expected to be falsey + with nested conditionals in else clause + is expected to be falsey + with nested conditionals in if clause + is expected to be falsey + with one elsif conditional + is expected to be truthy + with multiple elsif conditionals + is expected to be truthy + #if_branch + with an if statement + is expected to equal true + with an unless statement + is expected to equal true + with a ternary operator + is expected to equal true + #else? + with an elsif statement + is expected to be truthy + without an else statement + is expected to be falsey + #unless? + with an unless statement + is expected to be truthy + with a ternary operator + is expected to be falsey + with an if statement + is expected to be falsey + #modifier_form? + with a modifier if statement + is expected to be truthy + with a non-modifier unless statement + is expected to be falsey + with a ternary operator + is expected to be falsey + with a modifier unless statement + is expected to be truthy + with a non-modifier if statement + is expected to be falsey + #branches + with an elsif statement + is expected to eq 3 + is expected to all be literal + with an else statement + is expected to all be literal + is expected to eq 2 + with an if statement + is expected to eq 1 + is expected to all be literal + with an unless statement + is expected to all be literal + is expected to eq 1 + #else_branch + with an if statement + is expected to equal true + with a ternary operator + is expected to equal true + with an unless statement + is expected to equal true + .new + with a modifier statement + is expected to equal true + with a ternary operator + is expected to equal true + with a regular if statement + is expected to equal true + #elsif? + with an elsif statement + is expected to be truthy + without an elsif statement + is expected to be falsey + with an if statement comtaining an elsif + is expected to be falsey + +RuboCop::AST::StrNode + .new + with a normal string + is expected to equal true + with a heredoc + is expected to equal true + with a string with interpolation + is expected to equal true + #heredoc? + with a normal string + is expected to equal false + with a heredoc + is expected to equal true + with a string with interpolation + is expected to equal false RuboCop::AST::Token + #to_s + returns string of token data + .from_parser_token + sets parser token's type to rubocop token's type + sets parser token's range to rubocop token's pos + sets parser token's text to rubocop token's text + returns a #to_s useful for debugging + #line + returns line of token + #end_pos + returns index of last char in token range of entire source type predicates + #left_bracket? + returns false for non left_bracket tokens + returns true for all left_bracket tokens + #left_brace? + returns false for non right_bracket tokens + returns true for right_bracket tokens + #left_array_bracket? + returns true for left_array_bracket tokens + returns false for non left_array_bracket tokens #end? returns false for non end tokens returns true for end tokens + #comment? + returns true for comment tokens + returns false for non comment tokens + #left_ref_bracket? + returns false for non left_ref_bracket tokens + returns true for left_ref_bracket tokens + #semicolon? + returns true for semicolon tokens + returns false for non semicolon tokens + #comma? + returns false for non comma tokens + returns true for comma tokens + #right_bracket? + returns false for non right_bracket tokens + returns true for all right_bracket tokens with braces & parens #left_curly_brace? - returns false for non left block brace tokens returns true for left block brace tokens + returns false for non left block brace tokens + #left_brace? + returns true for left hash brace tokens + returns false for non left hash brace tokens #left_parens? returns false for non left parens tokens returns true for left parens tokens - #right_parens? - returns false for non right parens tokens - returns true for right parens tokens #right_curly_brace? - returns false for non right brace tokens returns true for all right brace tokens - #left_brace? - returns true for left hash brace tokens - returns false for non left hash brace tokens - #comma? - returns false for non comma tokens - returns true for comma tokens - #comment? - returns false for non comment tokens - returns true for comment tokens + returns false for non right brace tokens + #right_parens? + returns true for right parens tokens + returns false for non right parens tokens #rescue_modifier? - returns false for non rescue modifier tokens returns true for rescue modifier tokens - #left_array_bracket? - returns true for left_array_bracket tokens - returns false for non left_array_bracket tokens - #left_brace? - returns true for right_bracket tokens - returns false for non right_bracket tokens - #semicolon? - returns false for non semicolon tokens - returns true for semicolon tokens - #right_bracket? - returns true for all right_bracket tokens - returns false for non right_bracket tokens + returns false for non rescue modifier tokens #equals_sign? returns false for non equals sign tokens returns true for equals sign tokens - #left_ref_bracket? - returns false for non left_ref_bracket tokens - returns true for left_ref_bracket tokens - #left_bracket? - returns false for non left_bracket tokens - returns true for all left_bracket tokens - #end_pos - returns index of last char in token range of entire source #space_before - returns truthy MatchData when there is a space before token returns nil when there is not a space before token + returns truthy MatchData when there is a space before token returns nil when it is on the first line - #space_after - returns nil when there is not a space after token - returns truthy MatchData when there is a space after token - #begin_pos - returns index of first char in token range of entire source - #to_s - returns string of token data - #line - returns line of token - .from_parser_token - returns a #to_s useful for debugging - sets parser token's type to rubocop token's type - sets parser token's text to rubocop token's text - sets parser token's range to rubocop token's pos #column returns index of first char in token range on that line + #begin_pos + returns index of first char in token range of entire source + #space_after + returns truthy MatchData when there is a space after token + returns nil when there is not a space after token -RuboCop::AST::OrNode - #logical_operator? - with a semantic or node - is expected to equal false - with a logical or node - is expected to equal true - #inverse_operator - with a semantic or node - is expected to eq "and" - with a logical or node - is expected to eq "&&" - #alternate_operator - with a logical or node - is expected to eq "or" - with a semantic or node - is expected to eq "||" - #lhs - with a semantic or node - is expected to equal true - with a logical or node - is expected to equal true - #rhs - with a semantic or node +RuboCop::AST::NextNode + behaves like wrapped arguments node + .new + without arguments + is expected to equal true + with arguments + is expected to equal true + #arguments + with a single argument + is expected to eq 1 + with a single splat argument + is expected to eq 1 + with no arguments and braces + is expected to equal true + with no arguments + is expected to equal true + with multiple literal arguments + is expected to eq 2 + with a single argument and braces + is expected to eq 1 + +RuboCop::AST::ArrayNode + #bracketed? + with square brackets is expected to equal true - with a logical or node + with a percent literal is expected to equal true - #operator - with a logical or node - is expected to eq "||" - with a semantic or node - is expected to eq "or" + unbracketed + is expected to equal nil .new - with a logical or node + is expected to equal true + #percent_literal? + with a symbol percent literal + is expected to be truthy + is expected to be falsey + is expected to be truthy + with square brackets + is expected to be falsey + is expected to be falsey + is expected to be falsey + with a string percent literal + is expected to be falsey + is expected to be truthy + is expected to be truthy + #each_value + without block is expected to equal true - with a semantic or node + with block + is expected to eq ["(int 1)", "(int 2)", "(int 3)"] is expected to equal true - #semantic_operator? - with a semantic or node + #values + with an array of literals + is expected to all be literal + is expected to eq 3 + with an array of variables + is expected to eq 2 + is expected to all be send type + with an empty array is expected to equal true - with a logical or node - is expected to equal false + #square_brackets? + with square brackets + is expected to be truthy + with a percent literal + is expected to be falsey -RuboCop::AST::DefinedNode - #method_name - is expected to eq :defined? - #receiver - is expected to eq nil - #arguments - is expected to all be sym type - is expected to eq 1 +RuboCop::AST::IntNode .new - with a defined? node - is expected to equal true - -RuboCop::AST::ForwardArgsNode - when using Ruby 2.7 or newer - #to_a - is expected to contain exactly (be forward arg type) + is expected to be truthy + #value + is expected to eq 10 + #sign? + explicit negative int + is expected to be truthy + explicit positive int + is expected to be truthy -RuboCop::AST::KeywordSplatNode - #colon? - is expected to be falsey - #value_delta - when using colon delimiters - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - when keyword splat is behind - is expected to eq 0 - when keyword splat is left aligned - is expected to eq 0 - when using hash rocket delimiters - when keyword splat is behind - is expected to eq 0 - when keyword splat is left aligned - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - #key_delta - with alignment set to :left - when using hash rocket delimiters - when keyword splat is behind - is expected to eq -2 - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is aligned - is expected to eq 0 - when keyword splat is ahead - is expected to eq 2 - when using colon delimiters - when keyword splat is behind - is expected to eq -2 - when keyword splat is aligned - is expected to eq 0 - when keyword splat is ahead - is expected to eq 2 - when keyword splat is on the same line - is expected to eq 0 - with alignment set to :right - when using hash rocket delimiters - when keyword splat is behind - is expected to eq 0 - when keyword splat is aligned - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when using colon delimiters - when keyword splat is behind - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - when keyword splat is aligned - is expected to eq 0 - .new - is expected to equal true - #key - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #operator - is expected to eq "**" - #same_line? - when a multiline pair shares the same line +RuboCop::AST::SendNode + #comparison_method? + with a comparison method is expected to be truthy + with a regular method + is expected to be falsey + with a negation method + is expected to be falsey + #method_name + with an operator method + is expected to eq :== + with a setter method + is expected to eq :bar= + with a plain method + is expected to eq :bar + with an implicit call method + is expected to eq :call + #nonmutating_hash_method? + with a regular method + is expected to be falsey + with a mutating Hash method + is expected to be falsey + with a nonmutating Hash method is expected to be truthy - when pairs are on separate lines + #nonmutating_array_method? + with a regular method is expected to be falsey - when both pairs are on the same line + with a mutating Array method + is expected to be falsey + with a nonmutating Array method is expected to be truthy - #value - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #hash_rocket? - is expected to be falsey - -RuboCop::AST::RangeNode - .new - with a beignless range + #double_colon? + without a dot + is expected to be falsey + with a unary method + is expected to be falsey + with a dot + is expected to be falsey + with a double colon + is expected to be truthy + #arithmetic_operation? + with a unary numeric operation + is expected to be falsey + with a binary arithmetic operation + is expected to be truthy + with a regular method call + is expected to be falsey + #arguments + with multiple literal arguments + is expected to eq 2 + with multiple mixed arguments + is expected to eq 2 + with a single literal argument + is expected to eq 1 + with no arguments is expected to equal true + with a single splat argument + is expected to eq 1 + #method? + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey + #splat_argument? + with mixed arguments + is expected to be truthy + with a splat argument + is expected to be truthy + with regular arguments + is expected to be falsey + with no arguments + is expected to be falsey + #first_argument + with a single literal argument is expected to equal true - with an exclusive range + with multiple mixed arguments is expected to equal true + with multiple literal arguments is expected to equal true - with an inclusive range + with a single splat argument is expected to equal true + with no arguments is expected to equal true - with an infinite range + #const_receiver? + with a non-constant receiver + is expected to be falsey + with a constant receiver + is expected to be truthy + with a self receiver + is expected to be falsey + #command? + when argument is a string + with an implicit receiver + is expected to be truthy + with an explicit receiver + is expected to be falsey + when argument is a symbol + with an explicit receiver + is expected to be falsey + with an implicit receiver + is expected to be truthy + #implicit_call? + with a regular method + is expected to be falsey + with an implicit call method + is expected to be truthy + with an explicit call method + is expected to be falsey + #post_condition_loop? + is expected to equal false + #camel_case_method? + with a regular method + is expected to be falsey + with a camel case method + is expected to be truthy + #parenthesized? + with arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + with no arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #nonmutating_unary_operator_method? + with a regular method + is expected to be falsey + with a nonmutating unary operator method + is expected to be truthy + #last_argument + with multiple mixed arguments is expected to equal true + with a single literal argument is expected to equal true - -RuboCop::AST::SelfClassNode - #identifier - is expected to equal true - .new - is expected to equal true - #body - with a multi-expression body + with a single splat argument is expected to equal true - with a single expression body + with no arguments is expected to equal true - with an empty body - is expected to equal nil - -RuboCop::AST::WhileNode - #do? - with a do keyword + with multiple literal arguments + is expected to equal true + #loop_keyword? + is expected to equal false + #block_argument? + with regular arguments + is expected to be falsey + with mixed arguments is expected to be truthy - without a do keyword + with no arguments is expected to be falsey - #post_condition_loop? - with a statement while + with a block argument + is expected to be truthy + #def_modifier? + with several prefixed def modifiers + is expected to be truthy + with a prefixed def modifier + is expected to be truthy + #predicate_method? + with a bang method is expected to be falsey - with a modifier while + with a predicate method is expected to be truthy - #keyword - is expected to eq "while" - #inverse_keyword - is expected to eq "until" + with a regular method + is expected to be falsey + #non_bare_access_modifier? + when node is a non-bare `public` + is expected to be truthy + when node is a non-bare `private` + is expected to be truthy + when node is a non-bare `protected` + is expected to be truthy + when node is a non-bare `module_function` + is expected to be truthy + when node is not an access modifier + is expected to be falsey + when node does not have an argument + is expected to be falsey + #receiver + with a variable receiver + is expected to equal true + with a literal receiver + is expected to equal true + with no receiver + is expected to equal true + #prefix_bang? + with a non-negated method + is expected to be falsey + with keyword `not` + is expected to be falsey + with a bang method + is expected to be truthy + #lambda? + with a method named lambda in a class + is expected to be falsey + with a lambda method + is expected to be truthy + with a non-lambda method + is expected to be falsey + with a stabby lambda method + is expected to be truthy + #dot? + with a double colon + is expected to be falsey + without a dot + is expected to be falsey + with a unary method + is expected to be falsey + with a dot + is expected to be truthy + #negation_method? + with prefix `not` + is expected to be truthy + with suffix `not` + is expected to be falsey + with prefix bang + is expected to be truthy + with a non-negated method + is expected to be falsey + #prefix_not? + with keyword `not` + is expected to be truthy + with a non-negated method + is expected to be falsey + with a bang method + is expected to be falsey + #block_literal? + with a block argument + is expected to be falsey + with a block literal + is expected to be truthy + with no block + is expected to be falsey + #enumerable_method? + with an enumerable method + is expected to be truthy + with a regular method + is expected to be falsey + #access_modifier? + when node is a bare `public` + is expected to be truthy + when node is a non-bare `protected` + is expected to be truthy + when node is a non-bare `private` + is expected to be truthy + when node is a non-bare `module_function` + is expected to be truthy + when node is a bare `module_function` + is expected to be truthy + when node is a bare `private` + is expected to be truthy + when node is not an access modifier + is expected to be falsey + when node is a bare `protected` + is expected to be truthy + when node is a non-bare `public` + is expected to be truthy + #setter_method? + with a setter method + is expected to be truthy + with an indexed setter method + is expected to be truthy + with a regular method + is expected to be falsey + with an operator method + is expected to be falsey + #assignment_method? + with a bracket assignment method + is expected to be truthy + with an assignment method + is expected to be truthy + with a comparison method + is expected to be falsey + with a regular method + is expected to be falsey + #arguments? + with a single literal argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + with a single splat argument + is expected to be truthy + with multiple literal arguments + is expected to be truthy + with no arguments + is expected to be falsey + #attribute_accessor? + with an accessor + returns the accessor method and Array] + with a call without arguments + is expected to equal nil + #binary_operation?? + with a regular method call + is expected to equal false + with a binary operation + is expected to equal true + with a unary operation + is expected to equal false + with an implicit call method + is expected to equal false .new - with a statement while + with a regular method send is expected to equal true - with a modifier while + with a safe navigation method send is expected to equal true - #loop_keyword? - with a modifier while + #nonmutating_string_method? + with a regular method + is expected to be falsey + with a nonmutating String method is expected to be truthy - with a statement while + with a mutating String method + is expected to be falsey + #nonmutating_operator_method? + with a mutating binary operator method + is expected to be falsey + with a regular method + is expected to be falsey + with a nonmutating unary operator method is expected to be truthy - -RuboCop::AST::PairNode - #value_delta - when using colon delimiters - when both pairs are on the same line - is expected to eq 0 - when values are aligned - when both pairs are explicit pairs - is expected to eq 0 - when second pair is a keyword splat - is expected to eq 0 - when receiver value is behind - is expected to eq -2 - when receiver value is ahead - is expected to eq 2 - when using hash rocket delimiters - when receiver value is ahead - is expected to eq 2 - when receiver value is behind - is expected to eq -2 - when values are aligned - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when both pairs are on the same line - is expected to eq 0 - #value - is expected to equal true - #same_line? - when pairs are on separate lines - when both pairs are explicit pairs + with a nonmutating binary operator method + is expected to be truthy + #unary_operation? + with a unary operation + is expected to equal true + with a binary operation + is expected to equal false + with an implicit call method + is expected to equal false + with a regular method call + is expected to equal false + #nonmutating_binary_operator_method? + with a mutating binary operator method + is expected to be falsey + with a nonmutating binary operator method + is expected to be truthy + with a regular method + is expected to be falsey + #macro? + with a receiver + when parent is a class is expected to be falsey - when last pair is a keyword splat + when parent is a module is expected to be falsey - when a multiline pair shares the same line - when both pairs are explicit pairs + without a receiver + when parent is a begin without a parent is expected to be truthy + when parent is a keyword begin inside of an class is expected to be truthy - when last pair is a keyword splat + when parent is a method definition + is expected to be falsey + without a parent is expected to be truthy + when parent is a singleton class is expected to be truthy - when both pairs are on the same line - when both pairs are explicit pairs + when parent is a module is expected to be truthy - when both pair is a keyword splat + when parent is a class constructor is expected to be truthy - #key_delta - with alignment set to :left - when using colon delimiters - when both keys are on the same line - when both pairs are explicit pairs - is expected to eq 0 - when second pair is a keyword splat - is expected to eq 0 - when receiver key is ahead - when both pairs are explicit pairs - is expected to eq 2 - when second pair is a keyword splat - is expected to eq 2 - when keys are aligned - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is behind - when both pairs are reail pairs - is expected to eq -2 - when second pair is a keyword splat - is expected to eq -2 - when using hash rocket delimiters - when keys are aligned - when second key is a keyword splat - is expected to eq 0 - when both keys are explicit keys - is expected to eq 0 - when both keys are on the same line - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is ahead - when second pair is a keyword splat - is expected to eq 2 - when both pairs are explicit pairs - is expected to eq 2 - when receiver key is behind - when second pair is a keyword splat - is expected to eq -2 - when both pairs are explicit pairs - is expected to eq -2 - with alignment set to :right - when using colon delimiters - when receiver key is ahead - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 2 - when both keys are on the same line - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is behind - when second pair is a keyword splat - is expected to eq 0 - when both pairs are reail pairs - is expected to eq -2 - when keys are aligned - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when using hash rocket delimiters - when keys are aligned - when both keys are explicit keys - is expected to eq 0 - when second key is a keyword splat - is expected to eq 0 - when receiver key is ahead - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 2 - when receiver key is behind - when both pairs are explicit pairs - is expected to eq -2 - when second pair is a keyword splat - is expected to eq 0 - when both keys are on the same line - when both pairs are explicit pairs - is expected to eq 0 - when second pair is a keyword splat - is expected to eq 0 - #delimiter - when using a hash rocket delimiter - is expected to eq " => " - is expected to eq "=>" - when using a colon delimiter - is expected to eq ": " - is expected to eq ":" - #colon? - when using a colon delimiter + when parent is a class + is expected to be truthy + when parent is a block + is expected to be truthy + #bare_access_modifier? + when node is a bare `private` is expected to be truthy - when using a hash rocket delimiter + when node is a bare `module_function` + is expected to be truthy + when node is not an access modifier is expected to be falsey - #hash_rocket? - when using a colon delimiter + when node has an argument is expected to be falsey - when using a hash rocket delimiter + when node is a bare `public` is expected to be truthy - #value_on_new_line? - when value starts on a new line + when node is a bare `protected` is expected to be truthy - when pair is on a single line + #operator_method? + with a regular method is expected to be falsey - when value spans multiple lines + with a binary operator method + is expected to be truthy + with a unary operator method + is expected to be truthy + with a setter method is expected to be falsey - .new - is expected to equal true - #key - when using a symbol key + #lambda_literal? + with a non-lambda method + is expected to be falsey + with `a.() {}` style method + is expected to be falsey + with a lambda method + is expected to equal false + with a stabby lambda is expected to equal true - when using a string key + #bang_method? + with a regular method + is expected to be falsey + with a bang method + is expected to be truthy + with a predicate method + is expected to be falsey + #block_node + with a block argument is expected to equal true - #inverse_delimiter - when using a hash rocket delimiter - is expected to eq ": " - is expected to eq ":" - when using a colon delimiter - is expected to eq "=>" - is expected to eq " => " - -RuboCop::AST::AliasNode - #old_identifier - is expected to eq :bar - is expected to equal true - .new - is expected to equal true - #new_identifier - is expected to eq :foo - is expected to equal true + with no block + is expected to equal true + with a block literal + is expected to equal true + #self_receiver? + with a self receiver + is expected to be truthy + with a non-self receiver + is expected to be falsey + with an implicit receiver + is expected to be falsey -RuboCop::AST::ResbodyNode +RuboCop::AST::RangeNode .new - is expected to equal true - #body - is expected to equal true - #exception_variable - for an explicit rescue - is expected to eq "ex" - for an implicit rescue - is expected to eq "ex" - when an exception variable is not given - is expected to equal nil + with an inclusive range + is expected to equal true + is expected to equal true + with an exclusive range + is expected to equal true + is expected to equal true + with an infinite range + is expected to equal true + is expected to equal true + with a beignless range + is expected to equal true + is expected to equal true -RuboCop::AST::ModuleNode +RuboCop::AST::SuperNode + #self_receiver? + is expected to be falsey + #assignment_method? + is expected to be falsey + #command? + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #block_argument? + with regular arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + with no arguments + is expected to be falsey + with a block argument + is expected to be truthy + #setter_method? + is expected to be falsey + #macro? + is expected to be falsey + #parenthesized? + with arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + with no arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #arguments + with multiple mixed arguments + is expected to eq 2 + with no arguments + is expected to equal true + with a single literal argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + with a single splat argument + is expected to eq 1 .new - is expected to equal true - #body - with a single expression body + with a super node is expected to equal true - with a multi-expression body + with a zsuper node is expected to equal true - with an empty body - is expected to equal nil - #identifier + #method_name + is expected to eq :super + #block_literal? + with a block argument + is expected to be falsey + with a block literal + is expected to be truthy + with no block + is expected to be falsey + #block_node + with a block argument + is expected to equal true + with a block literal + is expected to equal true + with no block + is expected to equal true + #splat_argument? + with mixed arguments + is expected to be truthy + with a splat argument + is expected to be truthy + with no arguments + is expected to be falsey + with regular arguments + is expected to be falsey + #const_receiver? + is expected to be falsey + #receiver is expected to equal true - -RuboCop::AST::UntilNode - #post_condition_loop? - with a statement until + #method? + when message does not match + when argument is a symbol + is expected to be falsey + when argument is a string + is expected to be falsey + when message matches + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #double_colon? + is expected to be falsey + #comparison_method? + is expected to be falsey + #bang_method? + is expected to be falsey + #arguments? + with no arguments is expected to be falsey - with a modifier until + with multiple mixed arguments is expected to be truthy - #loop_keyword? - with a statement until + with multiple literal arguments is expected to be truthy - with a modifier until + with a single splat argument is expected to be truthy - #do? - with a do keyword + with a single literal argument is expected to be truthy - without a do keyword - is expected to be falsey - .new - with a statement until + #camel_case_method? + is expected to be falsey + #first_argument + with a single literal argument is expected to equal true - with a modifier until + with multiple mixed arguments is expected to equal true - #keyword - is expected to eq "until" - #inverse_keyword - is expected to eq "while" - -RuboCop::AST::ArrayNode - #bracketed? - with square brackets + with multiple literal arguments is expected to equal true - with a percent literal + with a single splat argument is expected to equal true - unbracketed - is expected to equal nil - #square_brackets? - with a percent literal + with no arguments + is expected to equal true + #predicate_method? + is expected to be falsey + #last_argument + with multiple mixed arguments + is expected to equal true + with multiple literal arguments + is expected to equal true + with a single splat argument + is expected to equal true + with no arguments + is expected to equal true + with a single literal argument + is expected to equal true + #operator_method? + is expected to be falsey + #dot? + is expected to be falsey + #implicit_call? + is expected to be falsey + +RuboCop::AST::CaseNode + #else? + without an else statement is expected to be falsey - with square brackets + with an else statement is expected to be truthy .new is expected to equal true - #each_value - without block - is expected to equal true - with block + #keyword + is expected to eq "case" + #else_branch + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal true + #when_branches + is expected to all be when type + is expected to eq 3 + #each_when + when not passed a block is expected to equal true - is expected to eq ["(int 1)", "(int 2)", "(int 3)"] - #percent_literal? - with a symbol percent literal - is expected to be truthy + when passed a block + yields all the conditions + #branches + when there is an else + returns all the bodies + with an empty else + returns all the bodies + when compared to an IfNode + returns the same + when there is no else keyword + returns only then when bodies + +RuboCop::AST::YieldNode + #operator_method? + is expected to be falsey + #receiver + is expected to equal true + #method_name + is expected to eq :yield + #splat_argument? + with a splat argument is expected to be truthy + with regular arguments is expected to be falsey - with a string percent literal - is expected to be truthy + with mixed arguments is expected to be truthy + with no arguments is expected to be falsey - with square brackets - is expected to be falsey - is expected to be falsey + #assignment_method? + is expected to be falsey + #const_receiver? + is expected to be falsey + #comparison_method? + is expected to be falsey + .new + is expected to equal true + #parenthesized? + with arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + with no arguments + when using parentheses + is expected to be truthy + when not using parentheses + is expected to be falsey + #arguments? + with a single literal argument + is expected to be truthy + with no arguments is expected to be falsey - #values - with an array of variables + with multiple literal arguments + is expected to be truthy + with a single splat argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + #last_argument + with multiple literal arguments + is expected to equal true + with a single splat argument + is expected to equal true + with a single literal argument + is expected to equal true + with no arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true + #bang_method? + is expected to be falsey + #block_argument? + is expected to be falsey + #method? + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey + when message matches + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #block_literal? + is expected to be falsey + #block_node + is expected to equal true + #first_argument + with no arguments + is expected to equal true + with multiple literal arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single literal argument + is expected to equal true + with a single splat argument + is expected to equal true + #camel_case_method? + is expected to be falsey + #setter_method? + is expected to be falsey + #implicit_call? + is expected to be falsey + #double_colon? + is expected to be falsey + #dot? + is expected to be falsey + #self_receiver? + is expected to be falsey + #command? + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + #arguments + with no arguments + is expected to equal true + with multiple literal arguments is expected to eq 2 - is expected to all be send type - with an array of literals - is expected to all be literal - is expected to eq 3 - with an empty array + with multiple mixed arguments + is expected to eq 2 + with a single literal argument + is expected to eq 1 + with a single splat argument + is expected to eq 1 + #macro? + is expected to be falsey + #predicate_method? + is expected to be falsey + +RuboCop::AST::AndNode + #inverse_operator + with a logical and node + is expected to eq "||" + with a semantic and node + is expected to eq "or" + #semantic_operator? + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal false + #rhs + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal true + #lhs + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal true + #alternate_operator + with a logical and node + is expected to eq "and" + with a semantic and node + is expected to eq "&&" + .new + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal true + #operator + with a logical and node + is expected to eq "&&" + with a semantic and node + is expected to eq "and" + #logical_operator? + with a semantic and node + is expected to equal false + with a logical and node is expected to equal true -RuboCop::AST::NextNode +RuboCop::AST::ReturnNode behaves like wrapped arguments node - .new - with arguments - is expected to equal true - without arguments - is expected to equal true #arguments - with no arguments - is expected to equal true with no arguments and braces is expected to equal true + with a single splat argument + is expected to eq 1 with multiple literal arguments is expected to eq 2 - with a single argument - is expected to eq 1 + with no arguments + is expected to equal true with a single argument and braces is expected to eq 1 - with a single splat argument + with a single argument is expected to eq 1 + .new + with arguments + is expected to equal true + without arguments + is expected to equal true RuboCop::AST::ProcessedSource + #file_path + returns file path + #[] + when a range is passed + returns the array of lines + when start index and length are passed + returns the array of lines + when an index is passed + returns the line + #ast + is the root node of AST valid_syntax? - when the source is invalid - returns false - when the source could not be parsed due to encoding error - returns false - when a line starts with an integer literal - tokenizes the source correctly + when the source is valid but has some warning diagnostics + returns true when the source is completely valid returns true + when the source could not be parsed due to encoding error + returns false when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI returns true - when the source is valid but has some warning diagnostics - returns true - #tokens - has an array of tokens - .from_file - raises a Errno::ENOENT when the file does not exist - when the file exists - sets the file path to the instance's #path - returns an instance of ProcessedSource - #blank? - with source with content + when the source is invalid returns false - with source of no content - returns true - #buffer - is a source buffer - #path - is the path passed to .new + when a line starts with an integer literal + tokenizes the source correctly + #lines + contains lines as string without linefeed + is an array + has same number of elements as line count #comments is an array of comments when the source is invalid returns [] - token enumerables - #find_token - yields nil when there is no match - yields correct token - #each_token - yields all tokens - #parser_error - when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII - is nil - when the source was properly parsed - is nil - when the source could not be parsed due to encoding error - returns the error - #following_line - returns source of line after token - #lines - has same number of elements as line count - contains lines as string without linefeed - is an array with heavily commented source + #find_comment + yields nil when there is no match + yields correct comment #each_comment_in_lines yields the comments - #comments_before_line - returns comments on or before given line + #contains_comment? + provided source_range on comment line + is expected to equal true + provided a multiline source_range with at least one line with comment + is expected to equal true + provided source_range on line with comment + is expected to equal true + provided source_range on line without comment + is expected to equal false #each_comment yields all comments #comment_at_line returns the comment at the given line number returns nil if line has no comment - #find_comment - yields correct comment - yields nil when there is no match + #comments_before_line + returns comments on or before given line #line_with_comment? returns true for lines with comments returns false for lines without comments - #contains_comment? - provided source_range on line with comment - is expected to equal true - provided source_range on comment line - is expected to equal true - provided source_range on line without comment - is expected to equal false - provided a multiline source_range with at least one line with comment - is expected to equal true + #following_line + returns source of line after token + #preceding_line + returns source of line before token + #parser_error + when the source was properly parsed + is nil + when the source could not be parsed due to encoding error + returns the error + when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII + is nil + .from_file + raises a Errno::ENOENT when the file does not exist + when the file exists + sets the file path to the instance's #path + returns an instance of ProcessedSource + #path + is the path passed to .new #start_with? with present source returns false when passed string that does not start source returns true when passed string that starts source with blank source returns false - #ast - is the root node of AST - #[] - when an index is passed - returns the line - when a range is passed - returns the array of lines - when start index and length are passed - returns the array of lines - #preceding_line - returns source of line before token - #file_path - returns file path + #buffer + is a source buffer + #blank? + with source with content + returns false + with source of no content + returns true + token enumerables + #each_token + yields all tokens + #find_token + yields correct token + yields nil when there is no match + #tokens + has an array of tokens -RuboCop::AST::EnsureNode +RuboCop::AST::DefinedNode + #receiver + is expected to eq nil + #arguments + is expected to eq 1 + is expected to all be sym type + #method_name + is expected to eq :defined? .new - is expected to equal true + with a defined? node + is expected to equal true + +RuboCop::AST::SymbolNode + .new + with a symbol node + is expected to equal true + #value + is expected to eq :foo + +RuboCop::AST::Node + #argument_type? + method arguments + returns true for all argument types + block arguments + returns true for all argument types + #struct_constructor? + ::Struct + matches + struct definition with a block + matches + struct definition without block + does not match + #sibling_index + returns its sibling index + #class_constructor? + class definition with a block + matches + class definition on outer scope + matches + module definition with a block + matches + class definition + does not match + #pure? + for a class definition + returns false + for a hash literal + which contains a method call + returns false + with only literal children + returns true + for a method call + returns false + for an lvar assignment + returns false + for a module definition + returns false + for a cvar assignment + returns false + for an integer literal + returns true + for a gvar assignment + returns false + for a nested if + where one branch contains an assignment statement + returns false + where the innermost descendants are local vars and literals + returns true + where one branch contains a method call + returns false + for an array literal + with only literal children + returns true + which contains a method call + returns false + for a regexp + with interpolated segments + returns false + with no interpolation + returns true + with options + returns true + for an ivar assignment + returns false + #module_definition? + included module definition + matches + nested modules + matches + with ::ModuleName + matches + with Module.new + matches + prepend Module.new + matches + using module keyword + matches + namespaced modules + matches + #value_used? + within an array literal + at the top level + is always false + assigned to an ivar + is always true + within a while node + is true only for the condition + at the end of a block + is always true + at the top level + is false + within a class definition node + is always true + within a singleton class node + is always true + within a module definition node + is always true + within a method call node + is always true + within an if...else..end node + nested in a method call + is always true + at the top level + is true only for the condition + #recursive_basic_literal? + behaves like literal + returns true for `(false && true)` + behaves like literal + returns true for `[1, 2, 3]` + behaves like non literal + returns false for `(x == false)` + behaves like non literal + returns false for `(x && false)` + behaves like non literal + returns false for `some_method_call(x, y)` + behaves like non literal + returns false for `some_method_call` + behaves like non literal + returns false for `%r{abx#{foo}}ixo` + behaves like non literal + returns false for `(x or false)` + behaves like literal + returns true for `'str'` + behaves like literal + returns true for `nil` + behaves like non literal + returns false for `{ :sym => some_method_call }` + behaves like literal + returns true for `(false <=> true)` + behaves like literal + returns true for `/./` + behaves like literal + returns true for `(false or true)` + behaves like literal + returns true for `!true` + behaves like literal + returns true for `{ a: 1, b: 2 }` + behaves like literal + returns true for `{ :a => 1, :b => 2 }` + behaves like literal + returns true for `%r{abx}ixo` + behaves like literal + returns true for `false` + behaves like literal + returns true for `"#{2}"` + behaves like literal + returns true for `1.0` + behaves like literal + returns true for `(1)` + behaves like literal + returns true for `1` + behaves like non literal + returns false for `/.#{some_method_call}/` + behaves like non literal + returns false for `{ some_method_call => :sym }` + behaves like non literal + returns false for `[some_method_call]` + #class_definition? + with inheritance + matches + namespaced class + matches + with Struct + matches + without inheritance + matches + with object singleton class + matches + constant defined as Struct without block + does not match + with self singleton class + matches + with Class.new + matches + with ::ClassName + matches + +RuboCop::AST::ClassNode #body + with a multi-expression body + is expected to equal true + with an empty body + is expected to equal nil + with a single expression body + is expected to equal true + #identifier + is expected to equal true + #parent_class + when a parent class is specified + is expected to equal true + when no parent class is specified + is expected to equal nil + .new is expected to equal true +RuboCop::AST::FloatNode + .new + is expected to be truthy + #value + is expected to eq 1.5 + #sign? + explicit negative float + is expected to be truthy + explicit positive float + is expected to be truthy + RuboCop::AST::RegexpNode - #to_regexp - with a regexp with option - is expected to eq /.+/mix - with an empty regexp - is expected to eq // - with a multi-line regexp with option - is expected to eq / -.+ -/ix - with a multi-line regexp without option - is expected to eq / -.+ -/ - with a regexp with an "o" option - is expected to eq "/abc/i" - with a regexp without option - is expected to eq /.+/ - with an empty regexp with option - is expected to eq //ix - #content - with a regexp without option - is expected to eq ".+" - with a multi-line regexp with option - is expected to eq "\n.+\n" - with a regexp with option - is expected to eq ".+" - with an empty regexp - is expected to eq "" - with an empty regexp with option - is expected to eq "" - with a multi-line regexp without option - is expected to eq "\n.+\n" + #multiline_mode? + with no options + is expected to equal false + with m and other options + is expected to equal true + with other options + is expected to equal false + with only m option + is expected to equal true #delimiters with %r/-delimiters is expected to eq ["/", "/"] @@ -1789,580 +2683,331 @@ is expected to eq ["/", "/"] with multi-line %r{-delimiters is expected to eq ["{", "}"] - with %r{-delimiters - is expected to eq ["{", "}"] with %r<-delimiters is expected to eq ["<", ">"] - #extended? - with x and other options - is expected to equal true + with %r{-delimiters + is expected to eq ["{", "}"] + #ignore_case? with no options is expected to equal false with other options is expected to equal false - with only x option + with i and other options + is expected to equal true + with only i option is expected to equal true - #percent_r_literal? - with %r{-delimiters - is expected to eq true - with %r/-delimiters - is expected to eq true - with %r<-delimiters - is expected to eq true - with /-delimiters - is expected to eq false - with multi-line %r{-delimiters - is expected to eq true .new is expected to equal true - #slash_literal? + #delimiter? with /-delimiters is expected to eq true - with multi-line %r{-delimiters is expected to eq false with %r{-delimiters is expected to eq false - with %r<-delimiters - is expected to eq false - with %r/-delimiters - is expected to eq false - #delimiter? - with %r<-delimiters - is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq true + is expected to eq true + with multi-line %r{-delimiters is expected to eq false + is expected to eq true is expected to eq false is expected to eq false + is expected to eq true is expected to eq false - with multi-line %r{-delimiters is expected to eq false is expected to eq false + with %r<-delimiters is expected to eq true - is expected to eq true - is expected to eq false is expected to eq false is expected to eq false is expected to eq false - with %r/-delimiters - is expected to eq false is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq false is expected to eq false - with %r{-delimiters is expected to eq false + with %r/-delimiters is expected to eq false is expected to eq false is expected to eq false - is expected to eq true is expected to eq false - is expected to eq true - is expected to eq false - with /-delimiters is expected to eq false is expected to eq true + is expected to eq false #regopt with a multi-line regexp without option is expected to equal true is expected to equal true - with a regexp without option - is expected to equal true + with a regexp with option + is expected to eq [:i, :m, :x] is expected to equal true with an empty regexp is expected to equal true is expected to equal true + with an empty regexp with option + is expected to eq [:i, :x] + is expected to equal true with a multi-line regexp with option - is expected to eq [:i, :m, :x] is expected to equal true - with a regexp with option is expected to eq [:i, :m, :x] + with a regexp without option is expected to equal true - with an empty regexp with option - is expected to eq [:i, :x] is expected to equal true - #no_encoding? + #extended? + with x and other options + is expected to equal true + with only x option + is expected to equal true with other options is expected to equal false with no options is expected to equal false - with n and other options - is expected to equal true - with only n option - is expected to equal true + #to_regexp + with a regexp without option + is expected to eq /.+/ + with a multi-line regexp without option + is expected to eq / +.+ +/ + with a regexp with an "o" option + is expected to eq "/abc/i" + with a multi-line regexp with option + is expected to eq / +.+ +/ix + with a regexp with option + is expected to eq /.+/mix + with an empty regexp with option + is expected to eq //ix + with an empty regexp + is expected to eq // #interpolation? - with no interpolation returns false - is expected to eq false with regexp quote is expected to eq true + with no interpolation returns false + is expected to eq false with direct variable interpoation is expected to eq true #single_interpolation? - with only o option - is expected to equal true - with no options - is expected to equal false with other options is expected to equal false + with only o option + is expected to equal true with o and other options is expected to equal true - #multiline_mode? with no options is expected to equal false - with m and other options - is expected to equal true - with only m option - is expected to equal true - with other options - is expected to equal false - #ignore_case? - with only i option + #slash_literal? + with %r<-delimiters + is expected to eq false + with %r{-delimiters + is expected to eq false + with multi-line %r{-delimiters + is expected to eq false + with %r/-delimiters + is expected to eq false + with /-delimiters + is expected to eq true + #percent_r_literal? + with %r/-delimiters + is expected to eq true + with multi-line %r{-delimiters + is expected to eq true + with %r{-delimiters + is expected to eq true + with /-delimiters + is expected to eq false + with %r<-delimiters + is expected to eq true + #content + with a multi-line regexp with option + is expected to eq "\n.+\n" + with an empty regexp with option + is expected to eq "" + with a regexp without option + is expected to eq ".+" + with an empty regexp + is expected to eq "" + with a regexp with option + is expected to eq ".+" + with a multi-line regexp without option + is expected to eq "\n.+\n" + #no_encoding? + with only n option is expected to equal true with no options is expected to equal false - with i and other options - is expected to equal true with other options is expected to equal false - -RuboCop::AST::ClassNode - #parent_class - when no parent class is specified - is expected to equal nil - when a parent class is specified + with n and other options is expected to equal true - #identifier - is expected to equal true + +RuboCop::AST::AliasNode .new is expected to equal true - #body - with a multi-expression body - is expected to equal true - with a single expression body - is expected to equal true - with an empty body - is expected to equal nil - -RuboCop::AST::Ext::Range - #line_span - returns the range of lines a range occupies - accepts an `exclude_end` keyword argument - -RuboCop::AST::YieldNode - #assignment_method? - is expected to be falsey - #method? - when message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - when message does not match - when argument is a symbol - is expected to be falsey - when argument is a string - is expected to be falsey - #implicit_call? - is expected to be falsey - #parenthesized? - with no arguments - when using parentheses - is expected to be truthy - when not using parentheses - is expected to be falsey - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - #splat_argument? - with no arguments - is expected to be falsey - with a splat argument - is expected to be truthy - with regular arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - #arguments? - with multiple mixed arguments - is expected to be truthy - with a single literal argument - is expected to be truthy - with a single splat argument - is expected to be truthy - with multiple literal arguments - is expected to be truthy - with no arguments - is expected to be falsey - #block_literal? - is expected to be falsey - #command? - when argument is a string - is expected to be truthy - when argument is a symbol - is expected to be truthy - #first_argument - with a single literal argument - is expected to equal true - with multiple literal arguments - is expected to equal true - with a single splat argument - is expected to equal true - with no arguments - is expected to equal true - with multiple mixed arguments - is expected to equal true - #camel_case_method? - is expected to be falsey - #setter_method? - is expected to be falsey - #block_node + #old_identifier + is expected to eq :bar is expected to equal true - #macro? - is expected to be falsey - #const_receiver? - is expected to be falsey - #receiver + #new_identifier is expected to equal true - #arguments - with a single literal argument - is expected to eq 1 - with no arguments - is expected to equal true - with multiple literal arguments - is expected to eq 2 - with a single splat argument - is expected to eq 1 - with multiple mixed arguments - is expected to eq 2 - #self_receiver? - is expected to be falsey - #predicate_method? - is expected to be falsey - #bang_method? - is expected to be falsey - #operator_method? - is expected to be falsey - #dot? - is expected to be falsey - #block_argument? - is expected to be falsey - #last_argument - with multiple mixed arguments - is expected to equal true - with no arguments - is expected to equal true - with multiple literal arguments - is expected to equal true - with a single splat argument - is expected to equal true - with a single literal argument - is expected to equal true - #double_colon? - is expected to be falsey - #method_name - is expected to eq :yield + is expected to eq :foo + +RuboCop::AST::KeywordSplatNode .new is expected to equal true - #comparison_method? + #operator + is expected to eq "**" + #key_delta + with alignment set to :left + when using colon delimiters + when keyword splat is ahead + is expected to eq 2 + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is aligned + is expected to eq 0 + when keyword splat is behind + is expected to eq -2 + when using hash rocket delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is behind + is expected to eq -2 + when keyword splat is aligned + is expected to eq 0 + when keyword splat is ahead + is expected to eq 2 + with alignment set to :right + when using colon delimiters + when keyword splat is ahead + is expected to eq 0 + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is aligned + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when using hash rocket delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when keyword splat is aligned + is expected to eq 0 + #value + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + #colon? is expected to be falsey - -RuboCop::AST::IfNode - #if_branch - with an unless statement - is expected to equal true - with an if statement - is expected to equal true - with a ternary operator - is expected to equal true - #elsif_conditional? - with nested ternary operators - when nested in the falsey branch - is expected to be falsey - when nested in the truthy branch - is expected to be falsey - with one elsif conditional - is expected to be truthy - with nested conditionals in else clause - is expected to be falsey - with multiple elsif conditionals - is expected to be truthy - with nested conditionals in if clause - is expected to be falsey - #if? - with a ternary operator - is expected to be falsey - with an if statement - is expected to be truthy - with an unless statement - is expected to be falsey - #else_branch - with an unless statement - is expected to equal true - with an if statement - is expected to equal true - with a ternary operator - is expected to equal true - #keyword - with an if statement - is expected to eq "if" - with an unless statement - is expected to eq "unless" - with a ternary operator - is expected to eq "" - #each_branch - when not passed a block - is expected to equal true - when passed a block - yields all the branches - #elsif? - with an if statement comtaining an elsif - is expected to be falsey - without an elsif statement - is expected to be falsey - with an elsif statement - is expected to be truthy - #inverse_keyword? - with a ternary operator - is expected to eq "" - with an unless statement - is expected to eq "if" - with an if statement - is expected to eq "unless" - #ternary? - with an if statement - is expected to be falsey - with a ternary operator - is expected to be truthy - with an unless statement - is expected to be falsey - .new - with a regular if statement - is expected to equal true - with a modifier statement - is expected to equal true - with a ternary operator - is expected to equal true - #unless? - with an if statement - is expected to be falsey - with a ternary operator - is expected to be falsey - with an unless statement - is expected to be truthy - #else? - without an else statement - is expected to be falsey - with an elsif statement - is expected to be truthy - #branches - with an if statement - is expected to all be literal - is expected to eq 1 - with an unless statement - is expected to all be literal - is expected to eq 1 - with an else statement - is expected to eq 2 - is expected to all be literal - with an elsif statement - is expected to eq 3 - is expected to all be literal - #modifier_form? - with a modifier unless statement + #key + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + #same_line? + when a multiline pair shares the same line is expected to be truthy - with a non-modifier if statement - is expected to be falsey - with a modifier if statement is expected to be truthy - with a ternary operator - is expected to be falsey - with a non-modifier unless statement - is expected to be falsey - #nested_conditional? - with nested conditionals in else clause - is expected to be truthy - with nested conditionals in elsif clause + when both pairs are on the same line is expected to be truthy - with no nested conditionals + when pairs are on separate lines is expected to be falsey - with nested conditionals in if clause - is expected to be truthy - with nested ternary operators - when nested in the truthy branch - is expected to be truthy - when nested in the falsey branch - is expected to be truthy + #value_delta + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when using hash rocket delimiters + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + #hash_rocket? + is expected to be falsey + +RuboCop::AST::ForwardArgsNode + when using Ruby 2.7 or newer + #to_a + is expected to contain exactly (be forward arg type) RuboCop::AST::ArgsNode - .new - with a block - is expected to equal true - with a method definition - is expected to equal true - with a lambda literal - is expected to equal true #empty_and_without_delimiters? with arguments with a method definition is expected to equal false with a lambda literal is expected to equal false - with delimiters - with a lambda literal - is expected to equal false - with a block - is expected to equal false - with a method definition - is expected to equal false with empty arguments with a method definition is expected to equal true + with a lambda literal + is expected to equal true with a block is expected to equal true + with delimiters + with a block + is expected to equal false + with a method definition + is expected to equal false with a lambda literal - is expected to equal true - -RuboCop::AST::IntNode - .new - is expected to be truthy - #sign? - explicit positive int - is expected to be truthy - explicit negative int - is expected to be truthy - #value - is expected to eq 10 - -RuboCop::AST::BlockNode - #void_context? - when block method is not each - is expected to be falsey - when block method is tap - is expected to be truthy - when block method is each - is expected to be truthy - #lambda? - when block belongs to a method lambda - is expected to be truthy - when block belongs to a non-lambda method - is expected to be falsey - when block belongs to a stabby lambda - is expected to be truthy - .new - is expected to equal true - #closing_delimiter - when enclosed in braces - is expected to eq "}" - when enclosed in do-end keywords - is expected to eq "end" - #braces? - when enclosed in do-end keywords - is expected to be falsey - when enclosed in braces - is expected to be truthy - #arguments? - with a single splat argument - is expected to be truthy - with no arguments - is expected to be falsey - >= Ruby 2.7 - using numbered parameters is expected to equal false - with multiple mixed arguments - is expected to be truthy - with a single argument - is expected to be truthy - #single_line? - when block is on several lines - is expected to be falsey - when block is on a single line - is expected to be truthy - #delimiters - when enclosed in do-end keywords - is expected to eq ["do", "end"] - when enclosed in braces - is expected to eq ["{", "}"] - #arguments - with a single literal argument - is expected to eq 1 - with multiple mixed arguments - is expected to eq 2 - with a single splat argument - is expected to eq 1 - with no arguments + .new + with a block + is expected to equal true + with a method definition + is expected to equal true + with a lambda literal is expected to equal true - >= Ruby 2.7 - using numbered parameters - is expected to equal true - #keywords? - when enclosed in braces - is expected to be falsey - when enclosed in do-end keywords - is expected to be truthy - #opening_delimiter - when enclosed in braces - is expected to eq "{" - when enclosed in do-end keywords - is expected to eq "do" - #multiline? - when block is on several lines - is expected to be truthy - when block is on a single line - is expected to be falsey - -RuboCop::AST::ReturnNode - behaves like wrapped arguments node - .new - with arguments - is expected to equal true - without arguments - is expected to equal true - #arguments - with a single argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with no arguments and braces - is expected to equal true - with a single splat argument - is expected to eq 1 - with no arguments - is expected to equal true - with a single argument and braces - is expected to eq 1 RuboCop::AST::HashNode #keys - with an empty hash - is expected to equal true with a hash with string keys - is expected to all be str type is expected to eq 2 + is expected to all be str type with a hash with symbol keys - is expected to all be sym type is expected to eq 3 + is expected to all be sym type + with an empty hash + is expected to equal true #mixed_delimiters? - when all pairs are using a colon delimiter - is expected to be falsey when pairs are using different delimiters is expected to be truthy + when all pairs are using a colon delimiter + is expected to be falsey when all pairs are using a hash rocket delimiter is expected to be falsey - .new - is expected to equal true - #each_value + #braces? + as an argument with braces + is expected to be truthy + as an argument with no braces + is expected to be falsey + with braces + is expected to be truthy + #each_pair + when passed a block + yields all the pairs when not passed a block is expected to equal true + #each_key when passed a block yields all the pairs + when not passed a block + is expected to equal true #empty? with a hash containing pairs is expected to equal false @@ -2370,16 +3015,6 @@ is expected to equal true with a hash containing a keyword splat is expected to equal false - #each_key - when not passed a block - is expected to equal true - when passed a block - yields all the pairs - #each_pair - when not passed a block - is expected to equal true - when passed a block - yields all the pairs #pairs with a hash of literals is expected to all be pair type @@ -2387,415 +3022,796 @@ with an empty hash is expected to equal true with a hash of variables - is expected to all be pair type is expected to eq 2 - #braces? - with braces - is expected to be truthy - as an argument with no braces + is expected to all be pair type + #pairs_on_same_line? + with no pairs on the same line is expected to be falsey - as an argument with braces + with some pairs on the same line + is expected to be truthy + with all pairs on the same line is expected to be truthy + .new + is expected to equal true + #each_value + when not passed a block + is expected to equal true + when passed a block + yields all the pairs #values with a hash with literal values is expected to eq 3 is expected to all be literal with a hash with string keys - is expected to eq 2 is expected to all be send type + is expected to eq 2 with an empty hash is expected to equal true - #pairs_on_same_line? - with all pairs on the same line + +RuboCop::AST::BreakNode + behaves like wrapped arguments node + #arguments + with multiple literal arguments + is expected to eq 2 + with a single splat argument + is expected to eq 1 + with a single argument + is expected to eq 1 + with a single argument and braces + is expected to eq 1 + with no arguments + is expected to equal true + with no arguments and braces + is expected to equal true + .new + without arguments + is expected to equal true + with arguments + is expected to equal true + +RuboCop::AST::PairNode + .new + is expected to equal true + #key_delta + with alignment set to :right + when using colon delimiters + when keys are aligned + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when receiver key is ahead + when both pairs are explicit pairs + is expected to eq 2 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is behind + when second pair is a keyword splat + is expected to eq 0 + when both pairs are reail pairs + is expected to eq -2 + when both keys are on the same line + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when using hash rocket delimiters + when receiver key is behind + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq -2 + when receiver key is ahead + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 2 + when both keys are on the same line + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when keys are aligned + when both keys are explicit keys + is expected to eq 0 + when second key is a keyword splat + is expected to eq 0 + with alignment set to :left + when using hash rocket delimiters + when keys are aligned + when both keys are explicit keys + is expected to eq 0 + when second key is a keyword splat + is expected to eq 0 + when both keys are on the same line + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is ahead + when both pairs are explicit pairs + is expected to eq 2 + when second pair is a keyword splat + is expected to eq 2 + when receiver key is behind + when second pair is a keyword splat + is expected to eq -2 + when both pairs are explicit pairs + is expected to eq -2 + when using colon delimiters + when receiver key is ahead + when second pair is a keyword splat + is expected to eq 2 + when both pairs are explicit pairs + is expected to eq 2 + when receiver key is behind + when second pair is a keyword splat + is expected to eq -2 + when both pairs are reail pairs + is expected to eq -2 + when keys are aligned + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when both keys are on the same line + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + #colon? + when using a colon delimiter is expected to be truthy - with some pairs on the same line + when using a hash rocket delimiter + is expected to be falsey + #key + when using a string key + is expected to equal true + when using a symbol key + is expected to equal true + #inverse_delimiter + when using a colon delimiter + is expected to eq "=>" + is expected to eq " => " + when using a hash rocket delimiter + is expected to eq ": " + is expected to eq ":" + #hash_rocket? + when using a colon delimiter + is expected to be falsey + when using a hash rocket delimiter is expected to be truthy - with no pairs on the same line + #same_line? + when pairs are on separate lines + when last pair is a keyword splat + is expected to be falsey + when both pairs are explicit pairs + is expected to be falsey + when a multiline pair shares the same line + when last pair is a keyword splat + is expected to be truthy + is expected to be truthy + when both pairs are explicit pairs + is expected to be truthy + is expected to be truthy + when both pairs are on the same line + when both pair is a keyword splat + is expected to be truthy + when both pairs are explicit pairs + is expected to be truthy + #value + is expected to equal true + #value_delta + when using colon delimiters + when receiver value is behind + is expected to eq -2 + when values are aligned + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when both pairs are on the same line + is expected to eq 0 + when receiver value is ahead + is expected to eq 2 + when using hash rocket delimiters + when receiver value is ahead + is expected to eq 2 + when values are aligned + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when both pairs are on the same line + is expected to eq 0 + when receiver value is behind + is expected to eq -2 + #value_on_new_line? + when pair is on a single line + is expected to be falsey + when value spans multiple lines is expected to be falsey + when value starts on a new line + is expected to be truthy + #delimiter + when using a colon delimiter + is expected to eq ":" + is expected to eq ": " + when using a hash rocket delimiter + is expected to eq "=>" + is expected to eq " => " RuboCop::AST::DefNode - #receiver - with a singleton method definition - is expected to equal true - with an instance method definition - is expected to equal true - with a class method definition - is expected to equal true #last_argument - with a single keyword argument + with multiple mixed arguments is expected to equal true - with a single regular argument + with no arguments is expected to equal true with a single rest argument is expected to equal true with multiple regular arguments is expected to equal true - with no arguments + with a single regular argument is expected to equal true - with multiple mixed arguments + with a single keyword argument is expected to equal true - #void_context? - with an initializer method - is expected to be truthy - with a regular assignment method - is expected to be truthy - with a bracket assignment method + #camel_case_method? + with a camel case method is expected to be truthy with a regular method is expected to be falsey - with a comparison method + #arguments? + with no arguments is expected to be falsey - #assignment_method? - with a bracket assignment method + with a single rest argument is expected to be truthy - with an assignment method + with a single regular argument is expected to be truthy - with a comparison method + with a single keyword argument + is expected to be truthy + with multiple regular arguments + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + when using Ruby 2.7 or newer + #argument_forwarding? + is expected to be truthy + #first_argument + with no arguments + is expected to equal true + with a single keyword argument + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single rest argument + is expected to equal true + with multiple regular arguments + is expected to equal true + with a single regular argument + is expected to equal true + #rest_argument? + with a rest argument + is expected to be truthy + with no arguments is expected to be falsey - with a regular method + with regular arguments is expected to be falsey + with mixed arguments + is expected to be truthy + #body + with a single expression body + is expected to equal true + with a multi-expression body + is expected to equal true + with no body + is expected to equal true #self_receiver? with an instance method definition is expected to be falsey + with a singleton method definition + is expected to be falsey with a class method definition is expected to be truthy - with a singleton method definition + #assignment_method? + with a bracket assignment method + is expected to be truthy + with a comparison method is expected to be falsey - #block_argument? - with regular arguments + with a regular method is expected to be falsey - with mixed arguments + with an assignment method is expected to be truthy + #block_argument? with a block argument is expected to be truthy + with mixed arguments + is expected to be truthy with no arguments is expected to be falsey - #body - with a single expression body - is expected to equal true - with a multi-expression body + with regular arguments + is expected to be falsey + .new + with a def node is expected to equal true - with no body + with a defs node is expected to equal true - #camel_case_method? - with a camel case method + #operator_method? + with a unary operator method is expected to be truthy - with a regular method + with a setter method is expected to be falsey - #bang_method? - with a predicate method + with a regular method is expected to be falsey - with a bang method + with a binary operator method + is expected to be truthy + #comparison_method? + with a comparison method is expected to be truthy with a regular method is expected to be falsey #predicate_method? - with a bang method - is expected to be falsey with a regular method is expected to be falsey + with a bang method + is expected to be falsey with a predicate method is expected to be truthy + #bang_method? + with a bang method + is expected to be truthy + with a predicate method + is expected to be falsey + with a regular method + is expected to be falsey #method_name with a plain method is expected to eq :foo + with a unary method + is expected to eq :-@ with an operator method is expected to eq :== with a setter method is expected to eq :foo= - with a unary method - is expected to eq :-@ - #method? - when message does not match - when argument is a symbol - is expected to be falsey - when argument is a string - is expected to be falsey - when message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - #const_receiver? + #receiver + with an instance method definition + is expected to equal true with a class method definition + is expected to equal true + with a singleton method definition + is expected to equal true + #void_context? + with a comparison method is expected to be falsey - with an instance method definition + with a regular method is expected to be falsey - with a singleton method definition + with a regular assignment method is expected to be truthy - #rest_argument? - with a rest argument + with a bracket assignment method is expected to be truthy - with no arguments - is expected to be falsey - with mixed arguments + with an initializer method is expected to be truthy - with regular arguments - is expected to be falsey - #operator_method? - with a regular method + #const_receiver? + with an instance method definition is expected to be falsey - with a binary operator method + with a singleton method definition is expected to be truthy - with a setter method + with a class method definition is expected to be falsey - with a unary operator method - is expected to be truthy + #method? + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey #arguments - with multiple mixed arguments - is expected to eq 2 with multiple regular arguments is expected to eq 2 with no arguments is expected to equal true - with a single rest argument - is expected to eq 1 - with a single regular argument - is expected to eq 1 + with multiple mixed arguments + is expected to eq 2 with argument forwarding is expected to eq 1 - when using Ruby 2.7 or newer - #argument_forwarding? - is expected to be truthy - #comparison_method? - with a comparison method - is expected to be truthy - with a regular method - is expected to be falsey - #arguments? - with multiple mixed arguments - is expected to be truthy - with no arguments - is expected to be falsey with a single regular argument - is expected to be truthy - with multiple regular arguments - is expected to be truthy - with a single keyword argument - is expected to be truthy - with a single rest argument - is expected to be truthy - .new - with a defs node - is expected to equal true - with a def node - is expected to equal true - #first_argument - with multiple mixed arguments - is expected to equal true - with a single keyword argument - is expected to equal true - with a single regular argument - is expected to equal true - with no arguments - is expected to equal true - with multiple regular arguments - is expected to equal true + is expected to eq 1 with a single rest argument - is expected to equal true + is expected to eq 1 RuboCop::AST::NodePattern - funcalls - with one argument - behaves like matching - matches - with multiple arguments - behaves like matching - matches - without extra arguments + in any order + with an ellipsis + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + without ellipsis + with matching children + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + with too many children + behaves like nonmatching + doesn't match + with too few children + behaves like nonmatching + doesn't match + captured + without ellipsis + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + doubled + separated by fixed argument + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + separated by an ellipsis + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a captured ellipsis + matching all children + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + matching non sequential children + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + nested + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + invalid + nested + behaves like invalid + is invalid + with an ellipsis inside and outside + behaves like invalid + is invalid + doubled with ellipsis + behaves like invalid + is invalid + at the beginning of a sequence + behaves like invalid + is invalid + containing ellipsis not at the end + behaves like invalid + is invalid + ellipsis + at the very beginning of a sequence behaves like matching matches - captures within union - with complex nesting - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with a different number of captures in each branch - behaves like invalid - is invalid - on simple subpatterns + with a nodetype at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + with a nested sequence at the end, but no remaining child + behaves like nonmatching + doesn't match + with [] at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + preceding a capture behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - within nested sequences + with a set at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + preceding multiple captures behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - params - when captured - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - when preceded by $... - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - when negated, with a matching value + with a wildcard at the end, but no remaining child to match it behaves like nonmatching doesn't match - when inside a union, with a matching value + comments + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + nil + against a node pattern (bug #5470) + behaves like nonmatching + doesn't match + nil value in AST, use nil? method behaves like matching matches - in root position + nil literals behaves like matching matches - in root position + nil value in AST + behaves like nonmatching + doesn't match + .descend + yields all children depth first + yields the given argument if it is not a Node + wildcards + unnamed wildcards + negated + behaves like nonmatching + doesn't match + at the root level behaves like matching matches - when inside an intersection + in head position of a sequence + behaves like matching + matches + within a sequence with other patterns intervening + behaves like matching + matches + within a sequence + behaves like matching + matches + named wildcards + within a sequence + with values which can be unified + behaves like matching + matches + with values which cannot be unified + behaves like nonmatching + doesn't match + unifying the node type with an argument + behaves like matching + matches + within a sequence with other patterns intervening + behaves like matching + matches + at the root level + behaves like matching + matches + in head position of a sequence + behaves like matching + matches + within a union + with a succeeding unifying constraint + with branches without the wildcard + encountered first + behaves like invalid + is invalid + encountered after + behaves like invalid + is invalid + with all branches with the wildcard + matching the first branch + behaves like matching + matches + that can not be unified + behaves like nonmatching + doesn't match + matching another branch + behaves like matching + matches + confined to the union + without unification + behaves like matching + matches + with partial unification + matching the free branch + behaves like matching + matches + that can not be unified + behaves like nonmatching + doesn't match + matching the unified branch + behaves like matching + matches + with a preceding unifying constraint + matching a branch + behaves like matching + matches + that can not be unified + behaves like nonmatching + doesn't match + bare node type + on a node with a matching, hyphenated type behaves like matching matches - when preceded by ... + on a node with the same type behaves like matching matches - when negated, with a nonmatching value + marshal compatibility behaves like matching matches - when inside a union, with a nonmatching value + #== + returns true iff the patterns are similar + #pattern + returns the pattern + on a node with a different type behaves like nonmatching doesn't match - param number zero - in a position which does not match original target node - behaves like nonmatching - doesn't match - in a position which matches original target node - behaves like matching - matches - in a nested sequence + yaml compatibility behaves like matching matches - as named parameters - when not provided - raises an ArgumentError - when provided as argument to match - behaves like matching - matches - when extra are provided - raises an ArgumentError - without explicit number + #dup behaves like matching matches - predicates - with one extra argument - for which the predicate is true - behaves like matching - matches - for which the predicate is false - behaves like nonmatching - doesn't match - in root position + #to_s + is instructive + funcalls + without extra arguments behaves like matching matches - with name containing a numeral - behaves like matching - matches with multiple arguments - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true - behaves like matching - matches - at head position of a sequence behaves like matching matches - with an expression argument - for which the predicate is false + with one argument + behaves like matching + matches + captures on ... + with a remaining capture at the end + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining set at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with remaining patterns at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + at the very beginning of a sequence + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining sequence at the end + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + with a remaining [] at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining node type at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining wildcard at the end + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + after a child + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining literal at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with no remaining pattern at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + simple sequence + with a nested sequence in non-head position + behaves like matching + matches + on a node with the same type and non-matching children + with non-matching receiver type behaves like nonmatching doesn't match - for which the predicate is true - behaves like matching - matches - applied to an integer for which the predicate is false - behaves like nonmatching - doesn't match - with a named argument - when not given - raises an error - for which the predicate is true - behaves like matching - matches - for which the predicate is false + with non-matching selector behaves like nonmatching doesn't match - with extra arguments - raises an error - when negated + on a node with too many children + behaves like nonmatching + doesn't match + on a node with a different type + behaves like nonmatching + doesn't match + with a nested sequence in head position + behaves like invalid + is invalid + on a node with the same type and matching children behaves like matching matches - when captured + descend + with an immediate match behaves like single capture + yields captured value(s) and returns true if there is a block returns captured values if there is no block + with a match multiple levels, depth first + behaves like single capture yields captured value(s) and returns true if there is a block - applied to an integer for which the predicate is true - behaves like matching - matches - when in last-child position, but all children have already been matched + returns captured values if there is no block + without match behaves like nonmatching doesn't match - with a constant argument - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true + with a literal match + behaves like matching + matches + nested + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + bad syntax + with empty intersection + behaves like invalid + is invalid + with unmatched opening curly + behaves like invalid + is invalid + with negated ellipsis + behaves like invalid + is invalid + with unmatched opening paren + behaves like invalid + is invalid + with unmatched opening paren and `...` + behaves like invalid + is invalid + with negated closing curly + behaves like invalid + is invalid + with empty parentheses + behaves like invalid + is invalid + with unmatched closing paren + behaves like invalid + is invalid + with doubled ellipsis + behaves like invalid + is invalid + with empty union + behaves like invalid + is invalid + with unmatched closing curly + behaves like invalid + is invalid + with doubled comma in arg list + behaves like invalid + is invalid + with negated closing paren + behaves like invalid + is invalid + with leading comma in arg list + behaves like invalid + is invalid + repeated + using * + with multiple subcaptures + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + nested with multiple subcaptures + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + without capture behaves like matching matches - repeated - using ? - behaves like repeated pattern - with an ellipsis in the same sequence - behaves like invalid - is invalid - at beginning of sequence - behaves like invalid - is invalid - with one match - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with zero match + with matching children behaves like single capture - yields captured value(s) and returns true if there is a block returns captured values if there is no block - with too many matching children + yields captured value(s) and returns true if there is a block + with no match behaves like nonmatching doesn't match - using + behaves like repeated pattern - with an ellipsis in the same sequence - behaves like invalid - is invalid - at beginning of sequence - behaves like invalid - is invalid with one match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block + at beginning of sequence + behaves like invalid + is invalid + with an ellipsis in the same sequence + behaves like invalid + is invalid with zero match - behaves like nonmatching - doesn't match - with matching children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - using * - nested with multiple subcaptures - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - without capture - behaves like matching - matches - with multiple subcaptures - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with zero match + using + + with matching children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with no match + with zero match behaves like nonmatching doesn't match behaves like repeated pattern @@ -2809,426 +3825,328 @@ at beginning of sequence behaves like invalid is invalid - with matching children + using ? + with zero match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - negation - on square brackets - with a node which meets only 1 requirement of [] - behaves like matching - matches - with a node which meets all requirements of [] - behaves like nonmatching - doesn't match - on a symbol - with a non-matching symbol, but too many children + with too many matching children behaves like nonmatching doesn't match - with a non-matching symbol + behaves like repeated pattern + with one match + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + at beginning of sequence + behaves like invalid + is invalid + with an ellipsis in the same sequence + behaves like invalid + is invalid + captures on a wildcard + in head position in a sequence against nil (bug #5470) + behaves like nonmatching + doesn't match + in head position in a sequence + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + in head position in a sequence against literal (bug #5470) + behaves like nonmatching + doesn't match + in non-head position in a sequence + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + in a nested sequence + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + at the root level + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + unions + with a nested sequence + behaves like matching + matches + nested inside a sequence + behaves like matching + matches + at the top level + containing symbol literals + when the AST has a matching symbol + behaves like matching + matches + when the AST does not have a matching symbol + behaves like nonmatching + doesn't match + containing mixed node and literals behaves like matching matches - with a matching symbol - behaves like nonmatching - doesn't match - when nested in complex ways - with (send int :- int) + containing multiple [] + on a node which meets some requirements but not all + behaves like nonmatching + doesn't match + on a node which meets all requirements of the first [] + behaves like matching + matches + on a node which meets all requirements of the second [] + behaves like matching + matches + containing integer literals behaves like matching matches - with (send str :+ (send str :to_i)) + containing string literals behaves like matching matches - with (send str :<< str) + node type + in seq head + on a child with a different type behaves like nonmatching doesn't match - on a sequence - with a node of different type - behaves like matching - matches - with a node with non-matching children + on a node with the same type behaves like matching matches - with a matching node - behaves like nonmatching - doesn't match - on a string - with a non-matching symbol + for a child + on a child with the same type behaves like matching matches - with a matching string + on a child litteral behaves like nonmatching doesn't match - on a set - with a matching value + on a child with a different type behaves like nonmatching doesn't match - with a non-matching value - behaves like matching - matches - sequence with trailing ... - on a node with the same type and fewer children - behaves like nonmatching - doesn't match - on a node with the same type and exact number of children + caret (ascend) + repeated twice behaves like matching matches - on a node with non-matching children - behaves like nonmatching - doesn't match - on a node with fewer children, with a wildcard preceding - behaves like nonmatching - doesn't match - on a node with a different type - behaves like nonmatching - doesn't match - on a node with the same type and more children - with 1 child more - behaves like matching - matches - with 2 children more - behaves like matching - matches - wildcards - unnamed wildcards - at the root level - behaves like matching - matches - negated + used with a node type + which doesn't match behaves like nonmatching doesn't match - within a sequence + which matches behaves like matching matches - in head position of a sequence + using unification to match self within parent + with self in the right position behaves like matching matches - within a sequence with other patterns intervening + with self in the wrong position + behaves like nonmatching + doesn't match + inside an intersection + behaves like matching + matches + inside a union + behaves like matching + matches + within sequence + in head behaves like matching matches - named wildcards - within a union - with a preceding unifying constraint - matching a branch - behaves like matching - matches - that can not be unified - behaves like nonmatching - doesn't match - with a succeeding unifying constraint - with all branches with the wildcard - matching the first branch - behaves like matching - matches - matching another branch - behaves like matching - matches - that can not be unified - behaves like nonmatching - doesn't match - with branches without the wildcard - encountered after - behaves like invalid - is invalid - encountered first - behaves like invalid - is invalid - confined to the union - with partial unification - matching the unified branch - behaves like matching - matches - matching the free branch - behaves like matching - matches - that can not be unified - behaves like nonmatching - doesn't match - without unification - behaves like matching - matches - within a sequence - with values which can be unified - behaves like matching - matches - unifying the node type with an argument + of a sequence behaves like matching matches - with values which cannot be unified - behaves like nonmatching - doesn't match - at the root level - behaves like matching - matches - in head position of a sequence - behaves like matching - matches - within a sequence with other patterns intervening + not in head behaves like matching matches - simple sequence - on a node with the same type and matching children - behaves like matching - matches - on a node with a different type - behaves like nonmatching - doesn't match - with a nested sequence in non-head position - behaves like matching - matches - on a node with the same type and non-matching children - with non-matching receiver type - behaves like nonmatching - doesn't match - with non-matching selector - behaves like nonmatching - doesn't match - with a nested sequence in head position + of a sequence + behaves like matching + matches + commas + with commas randomly strewn around behaves like invalid is invalid - on a node with too many children - behaves like nonmatching - doesn't match - captures on a wildcard - in a nested sequence - behaves like single capture + captures within union + within nested sequences + behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - in non-head position in a sequence - behaves like single capture - returns captured values if there is no block + with a different number of captures in each branch + behaves like invalid + is invalid + with complex nesting + behaves like multiple capture yields captured value(s) and returns true if there is a block - in head position in a sequence against literal (bug #5470) - behaves like nonmatching - doesn't match - in head position in a sequence against nil (bug #5470) - behaves like nonmatching - doesn't match - at the root level + returns captured values if there is no block + on simple subpatterns behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - in head position in a sequence + params + when inside an intersection + behaves like matching + matches + when captured behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - bare node type - marshal compatibility + in root position + in root position + behaves like matching + matches behaves like matching matches - on a node with a matching, hyphenated type + as named parameters + when extra are provided + raises an ArgumentError + when provided as argument to match + behaves like matching + matches + when not provided + raises an ArgumentError + param number zero + in a position which matches original target node + behaves like matching + matches + in a position which does not match original target node + behaves like nonmatching + doesn't match + when negated, with a nonmatching value behaves like matching matches - on a node with a different type - behaves like nonmatching - doesn't match - #== - returns true iff the patterns are similar - yaml compatibility + without explicit number behaves like matching matches - #dup + when preceded by ... behaves like matching matches - #pattern - returns the pattern - #to_s - is instructive - on a node with the same type + when inside a union, with a matching value behaves like matching matches - in any order - captured - without ellipsis - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with a captured ellipsis - matching all children - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - matching non sequential children - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - nested - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - doubled - separated by an ellipsis - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - separated by fixed argument - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with an ellipsis + in a nested sequence + behaves like matching + matches + when negated, with a matching value + behaves like nonmatching + doesn't match + when preceded by $... behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - invalid - with an ellipsis inside and outside - behaves like invalid - is invalid - doubled with ellipsis - behaves like invalid - is invalid - containing ellipsis not at the end - behaves like invalid - is invalid - at the beginning of a sequence - behaves like invalid - is invalid - nested - behaves like invalid - is invalid - without ellipsis - with too few children - behaves like nonmatching - doesn't match - with matching children - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with too many children + when inside a union, with a nonmatching value + behaves like nonmatching + doesn't match + literals + bare literal + on a matching literal + behaves like matching + matches + on a node behaves like nonmatching doesn't match - .descend - yields all children depth first - yields the given argument if it is not a Node - nil - nil value in AST, use nil? method + positive float literals behaves like matching matches - nil literals + symbol literals behaves like matching matches - against a node pattern (bug #5470) - behaves like nonmatching - doesn't match - nil value in AST - behaves like nonmatching - doesn't match - descend - with a match multiple levels, depth first - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with a literal match + negative integer literals behaves like matching matches - nested - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - without match - behaves like nonmatching - doesn't match - with an immediate match - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - commas - with commas randomly strewn around - behaves like invalid - is invalid - captures on ... - with a remaining sequence at the end - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - after a child - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with remaining patterns at the end + single quoted string literals + behaves like matching + matches + negative float literals + behaves like matching + matches + double quoted string literals + behaves like matching + matches + captures which also perform a match + on a set behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - with a remaining capture at the end - behaves like multiple capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with no remaining pattern at the end + on a literal behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - with a remaining set at the end + on a node type behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with a remaining node type at the end - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with a remaining literal at the end + on a sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with a remaining wildcard at the end - behaves like single capture - yields captured value(s) and returns true if there is a block + when nested + behaves like multiple capture returns captured values if there is no block - with a remaining [] at the end - behaves like single capture yields captured value(s) and returns true if there is a block - returns captured values if there is no block - at the very beginning of a sequence + on [] behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - ellipsis - with a nodetype at the end, but no remaining child to match it - behaves like nonmatching - doesn't match - with [] at the end, but no remaining child to match it - behaves like nonmatching - doesn't match - preceding multiple captures - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with a wildcard at the end, but no remaining child to match it + sequence with trailing ... + on a node with the same type and fewer children behaves like nonmatching doesn't match - with a set at the end, but no remaining child to match it + on a node with a different type behaves like nonmatching doesn't match - preceding a capture - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - at the very beginning of a sequence + on a node with the same type and exact number of children behaves like matching matches - with a nested sequence at the end, but no remaining child + on a node with non-matching children + behaves like nonmatching + doesn't match + on a node with fewer children, with a wildcard preceding behaves like nonmatching doesn't match + on a node with the same type and more children + with 2 children more + behaves like matching + matches + with 1 child more + behaves like matching + matches macros - with a pattern with captures + with a pattern without captures def_node_matcher - when called on matching code - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block when called on non-matching code behaves like nonmatching doesn't match + when called on matching code + behaves like matching + matches when it errors raises an error with the right location def_node_search with a predicate name + when it errors + raises an error with the right location + when called on non-matching code + behaves like nonmatching + doesn't match when called on matching code behaves like matching matches + without a predicate name + when called on matching code + returns an enumerator yielding the matches when called on non-matching code - behaves like nonmatching - doesn't match + returns an enumerator yielding nothing when it errors raises an error with the right location + with a pattern with captures + def_node_matcher + when it errors + raises an error with the right location + when called on matching code + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + when called on non-matching code + behaves like nonmatching + doesn't match + def_node_search without a predicate name + when called on non-matching code + returns an enumerator yielding nothing when called on matching code returns an enumerator yielding the captures when the pattern contains keyword_params @@ -3241,26 +4159,6 @@ uses the defaults when it errors raises an error with the right location - when called on non-matching code - returns an enumerator yielding nothing - with a pattern without captures - def_node_matcher - when called on matching code - behaves like matching - matches - when called on non-matching code - behaves like nonmatching - doesn't match - when it errors - raises an error with the right location - def_node_search - without a predicate name - when called on matching code - returns an enumerator yielding the matches - when called on non-matching code - returns an enumerator yielding nothing - when it errors - raises an error with the right location with a predicate name when called on matching code behaves like matching @@ -3271,1119 +4169,291 @@ behaves like nonmatching doesn't match with a pattern with a constant - behaves like matching - matches when the value is not in the set behaves like nonmatching doesn't match - literals - negative integer literals - behaves like matching - matches - negative float literals behaves like matching matches - bare literal - on a matching literal + predicates + with a constant argument + for which the predicate is true behaves like matching matches - on a node + for which the predicate is false behaves like nonmatching doesn't match - double quoted string literals - behaves like matching - matches - symbol literals - behaves like matching - matches - single quoted string literals - behaves like matching - matches - positive float literals + applied to an integer for which the predicate is true behaves like matching matches - bad syntax - with unmatched opening paren and `...` - behaves like invalid - is invalid - with empty intersection - behaves like invalid - is invalid - with doubled comma in arg list - behaves like invalid - is invalid - with empty union - behaves like invalid - is invalid - with unmatched closing paren - behaves like invalid - is invalid - with leading comma in arg list - behaves like invalid - is invalid - with unmatched closing curly - behaves like invalid - is invalid - with negated ellipsis - behaves like invalid - is invalid - with empty parentheses - behaves like invalid - is invalid - with negated closing paren - behaves like invalid - is invalid - with unmatched opening curly - behaves like invalid - is invalid - with unmatched opening paren - behaves like invalid - is invalid - with doubled ellipsis - behaves like invalid - is invalid - with negated closing curly - behaves like invalid - is invalid - captures which also perform a match - on a literal - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - when nested - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - on a node type - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - on a sequence - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - on [] + when captured behaves like single capture - returns captured values if there is no block yields captured value(s) and returns true if there is a block - on a set - behaves like single capture returns captured values if there is no block - yields captured value(s) and returns true if there is a block - unions - at the top level - containing mixed node and literals + in root position + with name containing a numeral behaves like matching matches - containing symbol literals - when the AST does not have a matching symbol - behaves like nonmatching - doesn't match - when the AST has a matching symbol - behaves like matching - matches - containing integer literals + behaves like matching + matches + with a named argument + for which the predicate is false + behaves like nonmatching + doesn't match + for which the predicate is true behaves like matching matches - containing string literals + when not given + raises an error + with extra arguments + raises an error + with multiple arguments + for which the predicate is false + behaves like nonmatching + doesn't match + for which the predicate is true behaves like matching matches - containing multiple [] - on a node which meets some requirements but not all - behaves like nonmatching - doesn't match - on a node which meets all requirements of the first [] - behaves like matching - matches - on a node which meets all requirements of the second [] - behaves like matching - matches - with a nested sequence + with an expression argument + for which the predicate is true + behaves like matching + matches + for which the predicate is false + behaves like nonmatching + doesn't match + applied to an integer for which the predicate is false + behaves like nonmatching + doesn't match + when in last-child position, but all children have already been matched + behaves like nonmatching + doesn't match + with one extra argument + for which the predicate is false + behaves like nonmatching + doesn't match + for which the predicate is true + behaves like matching + matches + when negated behaves like matching matches - nested inside a sequence + at head position of a sequence behaves like matching matches - node type - in seq head - on a child with a different type + negation + on square brackets + with a node which meets only 1 requirement of [] + behaves like matching + matches + with a node which meets all requirements of [] behaves like nonmatching doesn't match - on a node with the same type + on a sequence + with a node with non-matching children behaves like matching matches - for a child - on a child with a different type + with a node of different type + behaves like matching + matches + with a matching node behaves like nonmatching doesn't match - on a child litteral + when nested in complex ways + with (send str :<< str) behaves like nonmatching doesn't match - on a child with the same type - behaves like matching - matches - caret (ascend) - within sequence - not in head + with (send int :- int) behaves like matching matches - of a sequence - behaves like matching - matches - in head - of a sequence - behaves like matching - matches + with (send str :+ (send str :to_i)) behaves like matching matches - using unification to match self within parent - with self in the right position + on a symbol + with a non-matching symbol, but too many children + behaves like nonmatching + doesn't match + with a non-matching symbol behaves like matching matches - with self in the wrong position + with a matching symbol behaves like nonmatching doesn't match - repeated twice - behaves like matching - matches - inside an intersection - behaves like matching - matches - inside a union - behaves like matching - matches - used with a node type - which matches + on a string + with a matching string + behaves like nonmatching + doesn't match + with a non-matching symbol behaves like matching matches - which doesn't match + on a set + with a non-matching value + behaves like matching + matches + with a matching value behaves like nonmatching doesn't match - comments - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - -RuboCop::AST::WhenNode - #each_condition - when passed a block - yields all the conditions - when not passed a block - is expected to equal true - .new - is expected to equal true - #branch_index - is expected to eq 2 - is expected to eq 0 - is expected to eq 1 - #conditions - with a single condition - is expected to all be literal - is expected to eq 1 - with a multiple conditions - is expected to all be literal - is expected to eq 3 - #then? - without a then keyword - is expected to be falsey - with a then keyword - is expected to be truthy - #body - with a then keyword - is expected to equal true - without a then keyword - is expected to equal true - -RuboCop::AST::AndNode - .new - with a semantic and node - is expected to equal true - with a logical and node - is expected to equal true - #rhs - with a semantic and node - is expected to equal true - with a logical and node - is expected to equal true - #operator - with a semantic and node - is expected to eq "and" - with a logical and node - is expected to eq "&&" - #inverse_operator - with a logical and node - is expected to eq "||" - with a semantic and node - is expected to eq "or" - #logical_operator? - with a logical and node - is expected to equal true - with a semantic and node - is expected to equal false - #lhs - with a logical and node - is expected to equal true - with a semantic and node - is expected to equal true - #semantic_operator? - with a semantic and node - is expected to equal true - with a logical and node - is expected to equal false - #alternate_operator - with a semantic and node - is expected to eq "&&" - with a logical and node - is expected to eq "and" -RuboCop::AST::SuperNode - #block_literal? - with a block argument - is expected to be falsey - with no block - is expected to be falsey - with a block literal +RuboCop::AST::BlockNode + #void_context? + when block method is each is expected to be truthy - #arguments? - with no arguments + when block method is not each is expected to be falsey - with a single splat argument - is expected to be truthy - with multiple literal arguments - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - with a single literal argument + when block method is tap is expected to be truthy - #assignment_method? - is expected to be falsey - #double_colon? - is expected to be falsey - #parenthesized? - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with no arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - #receiver - is expected to equal true - #block_node - with a block literal - is expected to equal true - with a block argument - is expected to equal true - with no block - is expected to equal true - #self_receiver? - is expected to be falsey .new - with a zsuper node - is expected to equal true - with a super node - is expected to equal true - #implicit_call? - is expected to be falsey - #const_receiver? - is expected to be falsey - #command? - when argument is a string - is expected to be truthy - when argument is a symbol - is expected to be truthy - #first_argument - with multiple literal arguments - is expected to equal true - with multiple mixed arguments - is expected to equal true - with a single splat argument - is expected to equal true - with a single literal argument - is expected to equal true - with no arguments - is expected to equal true - #splat_argument? - with no arguments - is expected to be falsey - with regular arguments + is expected to equal true + #lambda? + when block belongs to a non-lambda method is expected to be falsey - with a splat argument - is expected to be truthy - with mixed arguments + when block belongs to a stabby lambda is expected to be truthy - #method_name - is expected to eq :super - #block_argument? - with mixed arguments + when block belongs to a method lambda is expected to be truthy - with no arguments + #opening_delimiter + when enclosed in do-end keywords + is expected to eq "do" + when enclosed in braces + is expected to eq "{" + #single_line? + when block is on several lines is expected to be falsey - with a block argument + when block is on a single line is expected to be truthy - with regular arguments - is expected to be falsey - #method? - when message does not match - when argument is a string - is expected to be falsey - when argument is a symbol - is expected to be falsey - when message matches - when argument is a string - is expected to be truthy - when argument is a symbol - is expected to be truthy - #camel_case_method? - is expected to be falsey - #comparison_method? - is expected to be falsey - #last_argument - with multiple mixed arguments - is expected to equal true - with no arguments - is expected to equal true - with a single splat argument - is expected to equal true - with multiple literal arguments - is expected to equal true - with a single literal argument - is expected to equal true - #bang_method? - is expected to be falsey - #operator_method? - is expected to be falsey - #predicate_method? - is expected to be falsey - #setter_method? - is expected to be falsey #arguments - with no arguments - is expected to equal true - with a single literal argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with multiple mixed arguments - is expected to eq 2 with a single splat argument is expected to eq 1 - #dot? - is expected to be falsey - #macro? - is expected to be falsey - -RuboCop::AST::CaseNode - #else? - with an else statement - is expected to be truthy - without an else statement - is expected to be falsey - #keyword - is expected to eq "case" - #when_branches - is expected to all be when type - is expected to eq 3 - .new - is expected to equal true - #each_when - when not passed a block - is expected to equal true - when passed a block - yields all the conditions - #else_branch - #else? - with an else statement - is expected to equal true - without an else statement - is expected to equal true - #branches - when there is an else - returns all the bodies - with an empty else - returns all the bodies - when there is no else keyword - returns only then when bodies - when compared to an IfNode - returns the same - -RuboCop::AST::BreakNode - behaves like wrapped arguments node - .new - with arguments - is expected to equal true - without arguments - is expected to equal true - #arguments - with no arguments and braces - is expected to equal true - with multiple literal arguments - is expected to eq 2 - with no arguments - is expected to equal true - with a single argument and braces - is expected to eq 1 - with a single argument - is expected to eq 1 - with a single splat argument - is expected to eq 1 - -RuboCop::AST::LambdaNode - #receiver - is expected to eq nil - #method_name - is expected to eq :lambda - #arguments - is expected to eq 2 - -RuboCop::AST::ForNode - .new - is expected to equal true - #loop_keyword? - is expected to be truthy - #post_condition_loop? - is expected to be falsey - #keyword - is expected to eq "for" - #variable - is expected to equal true - #collection - is expected to equal true - #void_context? - with a do keyword - is expected to be truthy - without a do keyword - is expected to be truthy - #body - is expected to equal true - #do? - with a do keyword - is expected to be truthy - without a do keyword - is expected to be falsey - -RuboCop::AST::SendNode - #block_literal? - with a block argument - is expected to be falsey - with no block - is expected to be falsey - with a block literal - is expected to be truthy - #post_condition_loop? - is expected to equal false - #nonmutating_array_method? - with a mutating Array method - is expected to be falsey - with a nonmutating Array method - is expected to be truthy - with a regular method - is expected to be falsey - #loop_keyword? - is expected to equal false - #comparison_method? - with a negation method - is expected to be falsey - with a regular method - is expected to be falsey - with a comparison method - is expected to be truthy - #assignment_method? - with a bracket assignment method - is expected to be truthy - with an assignment method - is expected to be truthy - with a comparison method - is expected to be falsey - with a regular method - is expected to be falsey - #def_modifier? - with several prefixed def modifiers - is expected to be truthy - with a prefixed def modifier - is expected to be truthy - #first_argument - with multiple literal arguments - is expected to equal true with no arguments is expected to equal true - with a single literal argument - is expected to equal true - with multiple mixed arguments - is expected to equal true - with a single splat argument - is expected to equal true - #setter_method? - with a setter method - is expected to be truthy - with an operator method - is expected to be falsey - with an indexed setter method - is expected to be truthy - with a regular method - is expected to be falsey - #nonmutating_unary_operator_method? - with a nonmutating unary operator method - is expected to be truthy - with a regular method - is expected to be falsey - #bare_access_modifier? - when node is a bare `private` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node is a bare `public` - is expected to be truthy - when node is a bare `protected` - is expected to be truthy - when node is a bare `module_function` - is expected to be truthy - when node has an argument - is expected to be falsey - #enumerable_method? - with an enumerable method - is expected to be truthy - with a regular method - is expected to be falsey - #unary_operation? - with a regular method call - is expected to equal false - with a unary operation - is expected to equal true - with a binary operation - is expected to equal false - with an implicit call method - is expected to equal false - #macro? - with a receiver - when parent is a module - is expected to be falsey - when parent is a class - is expected to be falsey - without a receiver - when parent is a begin without a parent - is expected to be truthy - when parent is a block - is expected to be truthy - when parent is a singleton class - is expected to be truthy - when parent is a class constructor - is expected to be truthy - without a parent - is expected to be truthy - when parent is a keyword begin inside of an class - is expected to be truthy - when parent is a module - is expected to be truthy - when parent is a method definition - is expected to be falsey - when parent is a class - is expected to be truthy - #nonmutating_hash_method? - with a mutating Hash method - is expected to be falsey - with a regular method - is expected to be falsey - with a nonmutating Hash method - is expected to be truthy - #access_modifier? - when node is a bare `private` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node is a bare `public` - is expected to be truthy - when node is a non-bare `private` - is expected to be truthy - when node is a non-bare `protected` - is expected to be truthy - when node is a non-bare `public` - is expected to be truthy - when node is a bare `protected` - is expected to be truthy - when node is a non-bare `module_function` - is expected to be truthy - when node is a bare `module_function` - is expected to be truthy - #arithmetic_operation? - with a regular method call - is expected to be falsey - with a unary numeric operation - is expected to be falsey - with a binary arithmetic operation - is expected to be truthy - #predicate_method? - with a regular method - is expected to be falsey - with a bang method - is expected to be falsey - with a predicate method - is expected to be truthy - #attribute_accessor? - with an accessor - returns the accessor method and Array] - with a call without arguments - is expected to equal nil - #nonmutating_binary_operator_method? - with a nonmutating binary operator method - is expected to be truthy - with a mutating binary operator method - is expected to be falsey - with a regular method - is expected to be falsey - #splat_argument? - with a splat argument - is expected to be truthy - with no arguments - is expected to be falsey - with regular arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - #operator_method? - with a unary operator method - is expected to be truthy - with a setter method - is expected to be falsey - with a regular method - is expected to be falsey - with a binary operator method - is expected to be truthy - #self_receiver? - with a self receiver - is expected to be truthy - with an implicit receiver - is expected to be falsey - with a non-self receiver - is expected to be falsey - #negation_method? - with suffix `not` - is expected to be falsey - with prefix bang - is expected to be truthy - with prefix `not` - is expected to be truthy - with a non-negated method - is expected to be falsey - #lambda? - with a non-lambda method - is expected to be falsey - with a lambda method - is expected to be truthy - with a stabby lambda method - is expected to be truthy - with a method named lambda in a class - is expected to be falsey - #const_receiver? - with a non-constant receiver - is expected to be falsey - with a constant receiver - is expected to be truthy - with a self receiver - is expected to be falsey - #arguments + >= Ruby 2.7 + using numbered parameters + is expected to equal true with multiple mixed arguments is expected to eq 2 with a single literal argument is expected to eq 1 - with no arguments - is expected to equal true - with a single splat argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - #block_node - with a block argument - is expected to equal true - with no block - is expected to equal true - with a block literal - is expected to equal true - #method? - when message does not match - when argument is a string - is expected to be falsey - when argument is a symbol - is expected to be falsey - when message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - .new - with a regular method send - is expected to equal true - with a safe navigation method send - is expected to equal true - #non_bare_access_modifier? - when node is a non-bare `private` - is expected to be truthy - when node does not have an argument - is expected to be falsey - when node is a non-bare `public` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node is a non-bare `module_function` - is expected to be truthy - when node is a non-bare `protected` - is expected to be truthy - #nonmutating_string_method? - with a mutating String method - is expected to be falsey - with a nonmutating String method - is expected to be truthy - with a regular method - is expected to be falsey - #lambda_literal? - with a non-lambda method - is expected to be falsey - with a stabby lambda - is expected to equal true - with `a.() {}` style method - is expected to be falsey - with a lambda method - is expected to equal false - #dot? - with a dot - is expected to be truthy - with a unary method - is expected to be falsey - with a double colon - is expected to be falsey - without a dot - is expected to be falsey - #receiver - with a literal receiver - is expected to equal true - with a variable receiver - is expected to equal true - with no receiver - is expected to equal true #arguments? - with no arguments - is expected to be falsey - with a single splat argument - is expected to be truthy + >= Ruby 2.7 + using numbered parameters + is expected to equal false with multiple mixed arguments is expected to be truthy - with multiple literal arguments + with a single argument is expected to be truthy - with a single literal argument + with a single splat argument is expected to be truthy - #parenthesized? with no arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - #bang_method? - with a predicate method is expected to be falsey - with a bang method - is expected to be truthy - with a regular method + #keywords? + when enclosed in braces is expected to be falsey - #block_argument? - with mixed arguments + when enclosed in do-end keywords is expected to be truthy - with no arguments - is expected to be falsey - with regular arguments + #closing_delimiter + when enclosed in braces + is expected to eq "}" + when enclosed in do-end keywords + is expected to eq "end" + #multiline? + when block is on a single line is expected to be falsey - with a block argument + when block is on several lines is expected to be truthy - #method_name - with a plain method - is expected to eq :bar - with an implicit call method - is expected to eq :call - with a setter method - is expected to eq :bar= - with an operator method - is expected to eq :== - #last_argument - with a single literal argument - is expected to equal true - with multiple literal arguments + #braces? + when enclosed in braces + is expected to be truthy + when enclosed in do-end keywords + is expected to be falsey + #delimiters + when enclosed in braces + is expected to eq ["{", "}"] + when enclosed in do-end keywords + is expected to eq ["do", "end"] + +RuboCop::AST::OrNode + #rhs + with a semantic or node is expected to equal true - with multiple mixed arguments + with a logical or node is expected to equal true - with a single splat argument + .new + with a semantic or node is expected to equal true - with no arguments + with a logical or node is expected to equal true - #command? - when argument is a symbol - with an explicit receiver - is expected to be falsey - with an implicit receiver - is expected to be truthy - when argument is a string - with an implicit receiver - is expected to be truthy - with an explicit receiver - is expected to be falsey - #camel_case_method? - with a camel case method - is expected to be truthy - with a regular method - is expected to be falsey - #prefix_bang? - with a non-negated method - is expected to be falsey - with a bang method - is expected to be truthy - with keyword `not` - is expected to be falsey - #prefix_not? - with keyword `not` - is expected to be truthy - with a bang method - is expected to be falsey - with a non-negated method - is expected to be falsey - #implicit_call? - with an explicit call method - is expected to be falsey - with a regular method - is expected to be falsey - with an implicit call method - is expected to be truthy - #nonmutating_operator_method? - with a regular method - is expected to be falsey - with a nonmutating unary operator method - is expected to be truthy - with a nonmutating binary operator method - is expected to be truthy - with a mutating binary operator method - is expected to be falsey - #double_colon? - with a dot - is expected to be falsey - without a dot - is expected to be falsey - with a unary method - is expected to be falsey - with a double colon - is expected to be truthy - #binary_operation?? - with a unary operation - is expected to equal false - with an implicit call method - is expected to equal false - with a binary operation + #lhs + with a semantic or node is expected to equal true - with a regular method call - is expected to equal false - -RuboCop::AST::StrNode - #heredoc? - with a heredoc + with a logical or node is expected to equal true - with a string with interpolation - is expected to equal false - with a normal string + #alternate_operator + with a logical or node + is expected to eq "or" + with a semantic or node + is expected to eq "||" + #logical_operator? + with a semantic or node is expected to equal false - .new - with a normal string + with a logical or node is expected to equal true - with a heredoc + #operator + with a semantic or node + is expected to eq "or" + with a logical or node + is expected to eq "||" + #semantic_operator? + with a semantic or node is expected to equal true - with a string with interpolation + with a logical or node + is expected to equal false + #inverse_operator + with a semantic or node + is expected to eq "and" + with a logical or node + is expected to eq "&&" + +RuboCop::AST::CaseMatchNode + when using Ruby 2.7 or newer + .new is expected to equal true + #else_branch + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal true + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal false + #each_in_pattern + when passed a block + yields all the conditions + when not passed a block + is expected to equal true + #in_pattern_branches + is expected to eq 3 + is expected to all be in pattern type + #keyword + is expected to eq "case" -RuboCop::AST::Node - #recursive_basic_literal? - behaves like literal - returns true for `(false or true)` - behaves like literal - returns true for `(false <=> true)` - behaves like non literal - returns false for `{ some_method_call => :sym }` - behaves like non literal - returns false for `%r{abx#{foo}}ixo` - behaves like literal - returns true for `1` - behaves like non literal - returns false for `/.#{some_method_call}/` - behaves like literal - returns true for `false` - behaves like literal - returns true for `/./` - behaves like literal - returns true for `(false && true)` - behaves like literal - returns true for `!true` - behaves like non literal - returns false for `some_method_call(x, y)` - behaves like non literal - returns false for `(x && false)` - behaves like literal - returns true for `(1)` - behaves like non literal - returns false for `{ :sym => some_method_call }` - behaves like literal - returns true for `{ :a => 1, :b => 2 }` - behaves like literal - returns true for `{ a: 1, b: 2 }` - behaves like non literal - returns false for `(x == false)` - behaves like literal - returns true for `nil` - behaves like literal - returns true for `"#{2}"` - behaves like literal - returns true for `[1, 2, 3]` - behaves like literal - returns true for `1.0` - behaves like non literal - returns false for `[some_method_call]` - behaves like non literal - returns false for `(x or false)` - behaves like non literal - returns false for `some_method_call` - behaves like literal - returns true for `'str'` - behaves like literal - returns true for `%r{abx}ixo` - #class_constructor? - class definition on outer scope - matches - module definition with a block - matches - class definition with a block - matches - class definition - does not match - #struct_constructor? - struct definition with a block - matches - ::Struct - matches - struct definition without block - does not match - #module_definition? - using module keyword - matches - nested modules - matches - with ::ModuleName - matches - with Module.new - matches - included module definition - matches - namespaced modules - matches - prepend Module.new - matches - #pure? - for a cvar assignment - returns false - for a method call - returns false - for an array literal - with only literal children - returns true - which contains a method call - returns false - for an lvar assignment - returns false - for a hash literal - which contains a method call - returns false - with only literal children - returns true - for a nested if - where the innermost descendants are local vars and literals - returns true - where one branch contains a method call - returns false - where one branch contains an assignment statement - returns false - for a regexp - with interpolated segments - returns false - with no interpolation - returns true - with options - returns true - for an integer literal - returns true - for a module definition - returns false - for a class definition - returns false - for an ivar assignment - returns false - for a gvar assignment - returns false - #argument_type? - method arguments - returns true for all argument types - block arguments - returns true for all argument types - #sibling_index - returns its sibling index - #class_definition? - with Struct - matches - with object singleton class - matches - with inheritance - matches - without inheritance - matches - with Class.new - matches - namespaced class - matches - constant defined as Struct without block - does not match - with ::ClassName - matches - with self singleton class - matches - #value_used? - within an array literal - assigned to an ivar - is always true - at the top level - is always false - within a method call node - is always true - within a module definition node - is always true - within an if...else..end node - at the top level - is true only for the condition - nested in a method call - is always true - at the top level - is false - within a singleton class node - is always true - within a while node - is true only for the condition - at the end of a block - is always true - within a class definition node - is always true +RuboCop::AST::ResbodyNode + #body + is expected to equal true + #exception_variable + for an implicit rescue + is expected to eq "ex" + for an explicit rescue + is expected to eq "ex" + when an exception variable is not given + is expected to equal nil + .new + is expected to equal true -Finished in 2.57 seconds (files took 1.52 seconds to load) +Finished in 1.81 seconds (files took 0.75044 seconds to load) 1401 examples, 0 failures -Randomized with seed 43662 +Randomized with seed 51987 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -4413,12 +4483,14 @@ dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) I: copying local configuration +I: user script /srv/workspace/pbuilder/43499/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/43499/tmp/hooks/B01_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/25249 and its subdirectories -I: Current time: Sat Jul 10 11:17:21 -12 2021 -I: pbuilder-time-stamp: 1625959041 +I: removing directory /srv/workspace/pbuilder/43499 and its subdirectories +I: Current time: Sat Aug 13 19:41:25 +14 2022 +I: pbuilder-time-stamp: 1660369285