Diff of the two buildlogs: -- --- b1/build.log 2021-08-08 16:38:50.632310753 +0000 +++ b2/build.log 2021-08-08 16:39:59.137738092 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Sun Aug 8 04:37:52 -12 2021 -I: pbuilder-time-stamp: 1628440672 +I: Current time: Sun Sep 11 13:01:53 +14 2022 +I: pbuilder-time-stamp: 1662850913 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration @@ -16,8 +16,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.qxWNKlz6/trustedkeys.kbx': General error -gpgv: Signature made Tue Aug 18 17:57:28 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.z5j46LqS/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 @@ -29,135 +29,169 @@ 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/7009/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/24359/tmp/hooks/D01_modify_environment starting +debug: Running on codethink15-arm64. +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/24359/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/24359/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='arm64' - DEBIAN_FRONTEND='noninteractive' + 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]="aarch64-unknown-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=arm64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=8' - DISTRIBUTION='' - HOME='/var/lib/jenkins' - HOST_ARCH='arm64' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/var/lib/jenkins + HOSTNAME=i-capture-the-hostname + HOSTTYPE=aarch64 + HOST_ARCH=arm64 IFS=' ' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='7009' - PS1='# ' - PS2='> ' + LANG=C + LANGUAGE=nl_BE:nl + LC_ALL=C + MACHTYPE=aarch64-unknown-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=24359 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.lLaCkFtvDH/pbuilderrc_J7Jn --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.lLaCkFtvDH/b1 --logfile b1/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' - SUDO_GID='117' - SUDO_UID='110' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - USERNAME='root' - _='/usr/bin/systemd-run' - http_proxy='http://192.168.101.16: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.lLaCkFtvDH/pbuilderrc_yJ0g --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.lLaCkFtvDH/b2 --logfile b2/build.log --extrapackages usrmerge ruby-rubocop-ast_0.3.0+dfsg-1.dsc' + SUDO_GID=117 + SUDO_UID=110 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + USERNAME=root + _='I: set' + http_proxy=http://192.168.101.16:3128 I: uname -a - Linux codethink10-arm64 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 07:06:07 UTC 2021 aarch64 GNU/Linux + Linux i-capture-the-hostname 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 07:06:07 UTC 2021 aarch64 GNU/Linux I: ls -l /bin total 5252 - -rwxr-xr-x 1 root root 1282512 Aug 4 08:25 bash - -rwxr-xr-x 3 root root 34808 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 34808 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 34808 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 14264 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 39832 Sep 22 2020 cat - -rwxr-xr-x 1 root root 64512 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 60368 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 64528 Sep 22 2020 chown - -rwxr-xr-x 1 root root 138896 Sep 22 2020 cp - -rwxr-xr-x 1 root root 129544 Dec 10 2020 dash - -rwxr-xr-x 1 root root 101384 Sep 22 2020 date - -rwxr-xr-x 1 root root 80984 Sep 22 2020 dd - -rwxr-xr-x 1 root root 89824 Sep 22 2020 df - -rwxr-xr-x 1 root root 143088 Sep 22 2020 dir - -rwxr-xr-x 1 root root 76152 Jul 28 07:09 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 35632 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 31512 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 64856 Jul 28 07:09 findmnt - -rwsr-xr-x 1 root root 34824 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 178400 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 93744 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 18440 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 68720 Sep 22 2020 ln - -rwxr-xr-x 1 root root 52720 Feb 7 2020 login - -rwxr-xr-x 1 root root 143088 Sep 22 2020 ls - -rwxr-xr-x 1 root root 161960 Jul 28 07:09 lsblk - -rwxr-xr-x 1 root root 85200 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 68744 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 43976 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 51368 Jul 28 07:09 more - -rwsr-xr-x 1 root root 51360 Jul 28 07:09 mount - -rwxr-xr-x 1 root root 14496 Jul 28 07:09 mountpoint - -rwxr-xr-x 1 root root 134808 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 35720 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Aug 4 08:25 rbash -> bash - -rwxr-xr-x 1 root root 43872 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 68592 Sep 22 2020 rm - -rwxr-xr-x 1 root root 43880 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 19208 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 114016 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Aug 6 21:25 sh -> dash - -rwxr-xr-x 1 root root 35656 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 72640 Sep 22 2020 stty - -rwsr-xr-x 1 root root 67776 Jul 28 07:09 su - -rwxr-xr-x 1 root root 35672 Sep 22 2020 sync - -rwxr-xr-x 1 root root 535768 Feb 16 21:55 tar - -rwxr-xr-x 1 root root 10568 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 89120 Sep 22 2020 touch - -rwxr-xr-x 1 root root 31512 Sep 22 2020 true - -rwxr-xr-x 1 root root 14264 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 30880 Jul 28 07:09 umount - -rwxr-xr-x 1 root root 35640 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 143088 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 59584 Jul 28 07:09 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/7009/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 1282512 Aug 5 2021 bash + -rwxr-xr-x 3 root root 34808 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 34808 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 34808 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 14264 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 39832 Sep 23 2020 cat + -rwxr-xr-x 1 root root 64512 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 60368 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 64528 Sep 23 2020 chown + -rwxr-xr-x 1 root root 138896 Sep 23 2020 cp + -rwxr-xr-x 1 root root 129544 Dec 11 2020 dash + -rwxr-xr-x 1 root root 101384 Sep 23 2020 date + -rwxr-xr-x 1 root root 80984 Sep 23 2020 dd + -rwxr-xr-x 1 root root 89824 Sep 23 2020 df + -rwxr-xr-x 1 root root 143088 Sep 23 2020 dir + -rwxr-xr-x 1 root root 76152 Jul 29 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 35632 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 31512 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 64856 Jul 29 2021 findmnt + -rwsr-xr-x 1 root root 34824 Feb 27 2021 fusermount + -rwxr-xr-x 1 root root 178400 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 93744 Mar 3 2021 gzip + -rwxr-xr-x 1 root root 18440 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 68720 Sep 23 2020 ln + -rwxr-xr-x 1 root root 52720 Feb 8 2020 login + -rwxr-xr-x 1 root root 143088 Sep 23 2020 ls + -rwxr-xr-x 1 root root 161960 Jul 29 2021 lsblk + -rwxr-xr-x 1 root root 85200 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 68744 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 43976 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 51368 Jul 29 2021 more + -rwsr-xr-x 1 root root 51360 Jul 29 2021 mount + -rwxr-xr-x 1 root root 14496 Jul 29 2021 mountpoint + -rwxr-xr-x 1 root root 134808 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 35720 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Aug 5 2021 rbash -> bash + -rwxr-xr-x 1 root root 43872 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 68592 Sep 23 2020 rm + -rwxr-xr-x 1 root root 43880 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 19208 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 114016 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Sep 11 13:02 sh -> bash + lrwxrwxrwx 1 root root 4 Sep 11 05:46 sh.distrib -> dash + -rwxr-xr-x 1 root root 35656 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 72640 Sep 23 2020 stty + -rwsr-xr-x 1 root root 67776 Jul 29 2021 su + -rwxr-xr-x 1 root root 35672 Sep 23 2020 sync + -rwxr-xr-x 1 root root 535768 Feb 17 2021 tar + -rwxr-xr-x 1 root root 10568 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 89120 Sep 23 2020 touch + -rwxr-xr-x 1 root root 31512 Sep 23 2020 true + -rwxr-xr-x 1 root root 14264 Feb 27 2021 ulockmgr_server + -rwsr-xr-x 1 root root 30880 Jul 29 2021 umount + -rwxr-xr-x 1 root root 35640 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 2021 uncompress + -rwxr-xr-x 1 root root 143088 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 59584 Jul 29 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/24359/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -334,7 +368,7 @@ Get: 131 http://deb.debian.org/debian bullseye/main arm64 ruby-rspec-mocks all 3.9.0c2e2m1s3-2 [81.4 kB] Get: 132 http://deb.debian.org/debian bullseye/main arm64 ruby-rspec all 3.9.0c2e2m1s3-2 [8348 B] Get: 133 http://deb.debian.org/debian bullseye/main arm64 ruby-whitequark-parser all 2.7.1.4-2 [394 kB] -Fetched 43.7 MB in 1s (44.8 MB/s) +Fetched 43.7 MB in 1s (48.2 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 ... 19646 files and directories currently installed.) @@ -890,8 +924,45 @@ 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 arm64 libnumber-compare-perl all 0.03-1.1 [6956 B] +Get:2 http://deb.debian.org/debian bullseye/main arm64 libtext-glob-perl all 0.11-1 [8888 B] +Get:3 http://deb.debian.org/debian bullseye/main arm64 libfile-find-rule-perl all 0.34-1 [30.6 kB] +Get:4 http://deb.debian.org/debian bullseye/main arm64 usrmerge all 25 [13.0 kB] +debconf: delaying package configuration, since apt-utils is not installed +Fetched 59.5 kB in 0s (2617 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 ... 26945 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 && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-rubocop-ast_0.3.0+dfsg-1_source.changes +hostname: Temporary failure in name resolution +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 && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-rubocop-ast_0.3.0+dfsg-1_source.changes dpkg-buildpackage: info: source package ruby-rubocop-ast dpkg-buildpackage: info: source version 0.3.0+dfsg-1 dpkg-buildpackage: info: source distribution unstable @@ -922,7 +993,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/d20210808-25001-ioxu30/gemspec +/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20220911-1136-zncsdt/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: @@ -932,7 +1003,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/d20210808-25001-ioxu30/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/d20220911-1136-zncsdt/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 @@ -1028,47 +1099,90 @@ warning: 2.7.1-compliant syntax, but you are running 2.7.4. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. -Randomized with seed 39563 - -RuboCop::AST::IntNode - #value - is expected to eq 10 - #sign? - explicit negative int - is expected to be truthy - explicit positive int - is expected to be truthy - .new - is expected to be truthy +Randomized with seed 7270 RuboCop::AST::NodePattern - captures within union - with complex nesting - 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 different number of captures in each branch - behaves like invalid - is invalid - on simple subpatterns + descend + nested 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 - behaves like multiple capture + 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 - literals - positive float literals + with a literal match behaves like matching matches - negative integer literals + without match + behaves like nonmatching + doesn't match + 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 + bad syntax + with doubled comma in arg list + behaves like invalid + is invalid + with empty union + behaves like invalid + is invalid + with doubled ellipsis + behaves like invalid + is invalid + with negated closing curly + behaves like invalid + is invalid + with unmatched opening curly + behaves like invalid + is invalid + with negated closing paren + behaves like invalid + is invalid + with empty intersection + behaves like invalid + is invalid + with unmatched opening paren and `...` + behaves like invalid + is invalid + with unmatched opening paren + behaves like invalid + is invalid + with unmatched closing paren + behaves like invalid + is invalid + with empty parentheses + behaves like invalid + is invalid + with leading comma in arg list + behaves like invalid + is invalid + with negated ellipsis + behaves like invalid + is invalid + with unmatched closing curly + behaves like invalid + is invalid + commas + with commas randomly strewn around + behaves like invalid + is invalid + nil + nil literals behaves like matching matches - symbol literals + against a node pattern (bug #5470) + behaves like nonmatching + doesn't match + nil value in AST + behaves like nonmatching + doesn't match + nil value in AST, use nil? method behaves like matching matches - single quoted string literals + literals + positive float literals behaves like matching matches bare literal @@ -1078,205 +1192,324 @@ on a node behaves like nonmatching doesn't match + symbol literals + behaves like matching + matches + single quoted string literals + behaves like matching + matches double quoted string literals behaves like matching matches + negative integer literals + behaves like matching + matches negative float literals behaves like matching matches - captures on a wildcard - at the root level - 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 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 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 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 - in a nested sequence + repeated + using + + with zero match + behaves like nonmatching + doesn't match + 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 + 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 ? + with too many matching children + behaves like nonmatching + doesn't match + 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 + behaves like repeated pattern + with an ellipsis in the same 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 + at beginning of sequence + behaves like invalid + is invalid + 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 + 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 + behaves like repeated pattern + at beginning of sequence + behaves like invalid + is invalid + with an ellipsis in the same 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 + 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 no match + behaves like nonmatching + doesn't match + without capture + behaves like matching + matches + 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 + .descend + yields all children depth first + yields the given argument if it is not a Node + predicates + applied to an integer for which the predicate is true + 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 - commas - with commas randomly strewn around - behaves like invalid - is invalid - simple sequence - on a node with the same type and non-matching children - with non-matching receiver type + with a constant argument + for which the predicate is false behaves like nonmatching doesn't match - with non-matching selector + for which the predicate is true + behaves like matching + matches + with multiple arguments + for which the predicate is true + behaves like matching + matches + for which the predicate is false 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 + at head position of a sequence behaves like matching matches - on a node with a different type - behaves like nonmatching - doesn't match - on a node with too many children + applied to an integer for which the predicate is false behaves like nonmatching doesn't match - with a nested sequence in non-head position + in root position behaves like matching matches - captures which also perform a match - on a literal + with name containing a numeral + behaves like matching + matches + when negated + behaves like matching + matches + 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 + 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 + with extra arguments + raises an error + when not given + raises an error + 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 + captures on a wildcard + 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 - on [] + returns captured values if there is no block + in a nested 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 a set + in head position in a sequence against literal (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 - when nested - behaves like multiple capture - yields captured value(s) and returns true if there is a block + in head position in a sequence against nil (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 - on a sequence + yields captured value(s) and returns true if there is a block + ellipsis + 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 - on a node type - behaves like single capture + with a nodetype at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + at the very beginning of a sequence + behaves like matching + matches + with a nested sequence at the end, but no remaining child + 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 - in any order - invalid - with an ellipsis inside and outside - behaves like invalid - is invalid - containing ellipsis not at the end - behaves like invalid - is invalid - nested - behaves like invalid - is invalid - doubled with ellipsis - behaves like invalid - is invalid - at the beginning of a sequence - behaves like invalid - is invalid - doubled - 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 - 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 - 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 - 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 - matching all 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 - 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 - without ellipsis - with too many children + with a set at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + with a wildcard at the end, but no remaining child to match it + behaves like nonmatching + doesn't match + negation + on a string + with a matching string behaves like nonmatching doesn't match - with too few children + with a non-matching symbol + behaves like matching + matches + when nested in complex ways + with (send str :<< str) 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 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 - node type - for a child - on a child litteral + with (send str :+ (send str :to_i)) + behaves like matching + matches + with (send int :- int) + behaves like matching + matches + on a sequence + with a matching node behaves like nonmatching doesn't match - on a child with the same type + with a node with non-matching children behaves like matching matches - on a child with a different type + with a node of different type + behaves like matching + matches + on a symbol + with a non-matching symbol, but too many children behaves like nonmatching doesn't match - in seq head - on a node with the same type + with a non-matching symbol behaves like matching matches - on a child with a different type + with a matching symbol behaves like nonmatching doesn't match - nil - nil value in AST - behaves like nonmatching - doesn't match - nil value in AST, use nil? method - behaves like matching - matches - nil literals - behaves like matching - matches - against a node pattern (bug #5470) - 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 - .descend - yields all children depth first - yields the given argument if it is not a Node + on square brackets + with a node which meets all requirements of [] + behaves like nonmatching + doesn't match + with a node which meets only 1 requirement of [] + behaves like matching + matches + on a set + with a matching value + behaves like nonmatching + doesn't match + with a non-matching value + behaves like matching + matches wildcards + unnamed wildcards + within a sequence + behaves like matching + matches + 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 + behaves like matching + matches + negated + behaves like nonmatching + doesn't match named wildcards + at the root level + behaves like matching + matches + within a sequence with other patterns intervening + behaves like matching + matches + within a sequence + unifying the node type with an argument + behaves like matching + matches + with values which can be unified + behaves like matching + matches + with values which cannot be unified + behaves like nonmatching + doesn't match + in head position of a sequence + behaves like matching + matches within a union - with a preceding unifying constraint - that can not be unified - behaves like nonmatching - doesn't match - matching a branch + confined to the union + without unification behaves like matching matches - with a succeeding unifying constraint - with all branches with the wildcard - matching the first branch + with partial unification + matching the free branch behaves like matching matches - matching another branch + matching the unified branch behaves like matching matches that can not be unified behaves like nonmatching doesn't match + 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 branches without the wildcard encountered first behaves like invalid @@ -1284,112 +1517,176 @@ encountered after behaves like invalid is invalid - confined to the union - without unification - behaves like matching - matches - with partial unification - matching the free branch + 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 - matching the unified branch - behaves like matching - matches - at the root level - behaves like matching - matches - in head position of a sequence + simple sequence + on a node with a different type + behaves like nonmatching + doesn't match + on a node with the same type and matching children + behaves like matching + matches + on a node with the same type and non-matching children + with non-matching selector + behaves like nonmatching + doesn't match + with non-matching receiver type + behaves like nonmatching + doesn't match + on a node with too many children + behaves like nonmatching + doesn't match + with a nested sequence in head position + behaves like invalid + is invalid + with a nested sequence in non-head position + behaves like matching + matches + caret (ascend) + used with a node type + which matches behaves like matching matches - within a sequence - with values which cannot be unified - behaves like nonmatching - doesn't match - unifying the node type with an argument + which doesn't match + behaves like nonmatching + doesn't match + inside a union + behaves like matching + matches + within sequence + not in head + of a sequence behaves like matching matches - with values which can be unified + behaves like matching + matches + in head + of a sequence behaves like matching matches - within a sequence with other patterns intervening behaves like matching matches - unnamed wildcards - in head position of a sequence + repeated twice + behaves like matching + matches + inside an intersection + behaves like matching + matches + using unification to match self within parent + with self in the right position behaves like matching matches - negated + with self in the wrong position behaves like nonmatching doesn't match - at the root level - behaves like matching - matches - within a sequence with other patterns intervening + sequence with trailing ... + on a node with fewer children, with a wildcard preceding + behaves like nonmatching + doesn't match + 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 + behaves like matching + matches + on a node with a different type + behaves like nonmatching + doesn't match + on a node with the same type and more children + with 2 children more behaves like matching matches - within a sequence + with 1 child more behaves like matching matches + on a node with non-matching children + behaves like nonmatching + doesn't match funcalls with one argument behaves like matching matches - with multiple arguments - behaves like matching - matches without extra arguments behaves like matching matches - params - when inside a union, with a matching value + with multiple arguments behaves like matching matches - in a nested sequence + unions + at the top level + containing integer literals + behaves like matching + matches + containing string literals + 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 multiple [] + 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 + on a node which meets some requirements but not all + behaves like nonmatching + doesn't match + containing mixed node and literals + behaves like matching + matches + with a nested sequence behaves like matching matches - when inside an intersection + nested inside a sequence behaves like matching matches - when captured + captures within union + with a different number of captures in each branch + behaves like invalid + is invalid + 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 + 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 - when negated, with a nonmatching value - behaves like matching - matches - as named parameters - when provided as argument to match - behaves like matching - matches - when not provided - raises an ArgumentError - when extra are provided - raises an ArgumentError - when preceded by ... + 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 + params + in a nested sequence behaves like matching matches - when negated, with a matching value - behaves like nonmatching - doesn't match - without explicit number + 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 inside a union, with a matching value behaves like matching matches - when inside a union, with a nonmatching value - behaves like nonmatching - doesn't match in root position - behaves like matching - matches in root position behaves like matching matches - when preceded by $... - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block + behaves like matching + matches param number zero in a position which matches original target node behaves like matching @@ -1397,123 +1694,156 @@ in a position which does not match original target node behaves like nonmatching doesn't match - bare node type - #dup - behaves like matching - matches - yaml compatibility - behaves like matching - matches - #to_s - is instructive - on a node with the same type + when inside a union, with a nonmatching value + behaves like nonmatching + doesn't match + when preceded by ... behaves like matching matches - on a node with a different type + when negated, with a matching value behaves like nonmatching doesn't match - on a node with a matching, hyphenated type + without explicit number behaves like matching matches - #== - returns true iff the patterns are similar - #pattern - returns the pattern - marshal compatibility + when inside an intersection behaves like matching matches - negation - on a sequence - with a node of different type - behaves like matching - matches - with a node with non-matching children - behaves like matching - matches - with a matching node - behaves like nonmatching - doesn't match - on square brackets - with a node which meets all requirements of [] - behaves like nonmatching - doesn't match - with a node which meets only 1 requirement of [] + as named parameters + when provided as argument to match behaves like matching matches - on a symbol - with a matching symbol + when not provided + raises an ArgumentError + when extra are provided + raises an ArgumentError + when negated, with a nonmatching value + behaves like matching + matches + 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 + in any order + without ellipsis + with too few children behaves like nonmatching doesn't match - with a non-matching symbol - behaves like matching - matches - with a non-matching symbol, but too many children + with matching children + 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 too many children behaves like nonmatching doesn't match - on a set - with a matching value + invalid + doubled with ellipsis + behaves like invalid + is invalid + with an ellipsis inside and outside + 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 + 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 + 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 + 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 + matching all 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 + 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 + 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 + node type + for a child + on a child litteral behaves like nonmatching doesn't match - with a non-matching value + on a child with the same type behaves like matching matches - on a string - with a matching string + on a child with a different type behaves like nonmatching doesn't match - with a non-matching symbol - behaves like matching - matches - when nested in complex ways - with (send str :+ (send str :to_i)) - behaves like matching - matches - with (send int :- int) - behaves like matching - matches - with (send str :<< str) + in seq head + on a child with a different type behaves like nonmatching doesn't match - sequence with trailing ... - on a node with the same type and more children - with 2 children more - behaves like matching - matches - with 1 child more + on a node with the same type behaves like matching matches - on a node with non-matching children - behaves like nonmatching - doesn't match - on a node with a different type - 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 exact number of children - behaves like matching - matches - on a node with the same type and fewer children - behaves like nonmatching - doesn't match macros - with a pattern with captures + with a pattern without captures + def_node_matcher + when called on matching code + behaves like matching + matches + when it errors + raises an error with the right location + when called on non-matching code + behaves like nonmatching + doesn't match def_node_search - with a predicate name + without a predicate name + when called on non-matching code + returns an enumerator yielding nothing + when it errors + raises an error with the right location when called on matching code - behaves like matching - matches + returns an enumerator yielding the matches + 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 + with a pattern with 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 it errors + raises an error with the right location + def_node_search without a predicate name when it errors raises an error with the right location - 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 @@ -1524,1027 +1854,415 @@ uses the defaults some defaults are not params raises an error - def_node_matcher - 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 single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with a pattern with a constant - behaves like matching - matches - when the value is not in the set - behaves like nonmatching - doesn't match - with a pattern without captures - 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 it errors - raises an error with the right location when called on matching code behaves like matching matches + when it errors + raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match - def_node_matcher - when called on matching code - behaves like matching - matches - when it errors - raises an error with the right location - when called on non-matching code - behaves like nonmatching - doesn't match - repeated - using ? - with too many matching children - behaves like nonmatching - doesn't match - 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 - with an ellipsis in the same sequence - behaves like invalid - is invalid - at beginning of sequence - behaves like invalid - is invalid - 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 - using + - behaves like repeated pattern - with an ellipsis in the same 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 - at beginning of sequence - behaves like invalid - is invalid - 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 - with zero match - behaves like nonmatching - doesn't match - using * - with multiple subcaptures - 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 zero 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 - 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 - behaves like repeated pattern - at beginning of sequence - behaves like invalid - is invalid - with an ellipsis in the same 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 - without capture - behaves like matching - matches - 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 - with no match + with a pattern with a constant + when the value is not in the set behaves like nonmatching doesn't match - unions - nested inside a sequence behaves like matching matches - at the top level - containing multiple [] - 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 - on a node which meets some requirements but not all - behaves like nonmatching - doesn't match - containing string literals - behaves like matching - matches - 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 integer literals - behaves like matching - matches - containing mixed node and literals - behaves like matching - matches - with a nested sequence + bare node type + on a node with a matching, hyphenated type behaves like matching matches - bad syntax - with doubled comma in arg list - behaves like invalid - is invalid - with negated closing curly - behaves like invalid - is invalid - with leading comma in arg list - behaves like invalid - is invalid - with empty parentheses - behaves like invalid - is invalid - with negated closing paren - behaves like invalid - is invalid - with doubled ellipsis - behaves like invalid - is invalid - with unmatched opening paren and `...` - behaves like invalid - is invalid - with unmatched closing paren - behaves like invalid - is invalid - with unmatched opening curly - behaves like invalid - is invalid - with empty intersection - behaves like invalid - is invalid - with negated ellipsis - behaves like invalid - is invalid - with unmatched opening paren - behaves like invalid - is invalid - with unmatched closing curly - behaves like invalid - is invalid - with empty union - behaves like invalid - is invalid + on a node with a different type + behaves like nonmatching + doesn't match + on a node with the same type + behaves like matching + matches + #pattern + returns the pattern + #== + returns true iff the patterns are similar + #to_s + is instructive + #dup + behaves like matching + matches + marshal compatibility + behaves like matching + matches + yaml compatibility + behaves like matching + matches + comments + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block captures on ... - with a remaining node type at the end + 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 set at the end + with a remaining literal 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 remaining patterns at the end + 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 + returns captured values if there is no block with a remaining wildcard 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 sequence at the end - behaves like single capture + returns captured values if there is no 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 + at the very beginning of 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 [] at the end + with remaining patterns 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 + 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 - after a child + 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 literal at the end + with no remaining pattern 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 capture at the end - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - predicates - with a constant argument - for which the predicate is true - behaves like matching - matches - for which the predicate is false - behaves like nonmatching - doesn't match - at head position of a sequence - behaves like matching - matches - when captured + with a remaining node type 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 - applied to an integer for which the predicate is true - behaves like matching - matches - with multiple arguments - 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 - when negated - behaves like matching - matches - 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 - with a named argument - with extra arguments - raises an error - for which the predicate is true - behaves like matching - matches - when not given - raises an error - for which the predicate is false - behaves like nonmatching - doesn't match - 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 - with name containing a numeral - behaves like matching - matches - behaves like matching - matches - caret (ascend) - using unification to match self within parent - with self in the right position - behaves like matching - matches - with self in the wrong position - behaves like nonmatching - doesn't match - used with a node type - which doesn't match - behaves like nonmatching - doesn't match - which matches - behaves like matching - matches - inside a union - behaves like matching - matches - within sequence - in head - behaves like matching - matches - of a sequence - behaves like matching - matches - not in head - behaves like matching - matches - of a sequence - behaves like matching - matches - inside an intersection - behaves like matching - matches - repeated twice - behaves like matching - matches - descend - with a literal match - behaves like matching - matches - without match - behaves like nonmatching - doesn't match - nested + yields captured value(s) and returns true if there is a block + 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 match multiple levels, depth first + 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 an immediate match + on a node type behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - ellipsis - with a wildcard 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 - at the very beginning of a sequence - behaves like matching - matches - preceding a capture + 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 nested sequence at the end, but no remaining child - behaves like nonmatching - doesn't match - preceding multiple captures + when 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 - with a nodetype at the end, but no remaining child to match it - behaves like nonmatching - doesn't match - with a set at the end, but no remaining child to match it - behaves like nonmatching - doesn't match + on [] + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block -RuboCop::AST::PairNode - #same_line? - 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 - when a multiline pair shares the same line - when both pairs are explicit pairs - is expected to be truthy - is expected to be truthy - when last pair is a keyword splat - is expected to be truthy - is expected to be truthy - 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 - #value - 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 ": " - #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 - #colon? - when using a colon delimiter +RuboCop::AST::IntNode + #sign? + explicit negative int is expected to be truthy - when using a hash rocket delimiter - is expected to be falsey - #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 ": " - .new - is expected to equal true - #hash_rocket? - when using a colon delimiter - is expected to be falsey - when using a hash rocket delimiter + explicit positive int is expected to be truthy - #key - when using a string key - is expected to equal true - when using a symbol key - is expected to equal true - #value_delta - when using colon 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 - when using hash rocket delimiters - when both pairs are on the same line - is expected to eq 0 - 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 receiver value is behind - is expected to eq -2 - when receiver value is ahead - is expected to eq 2 - #key_delta - with alignment set to :right - when using hash rocket 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 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 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 using colon delimiters - 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 0 - when both pairs are explicit 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 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 - with alignment set to :left - when using colon delimiters - 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 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 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 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 using hash rocket delimiters - 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 -2 - 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 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 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 - -RuboCop::AST::ClassNode - #body - with a single expression body - is expected to equal true - with a multi-expression body - is expected to equal true - with an empty body - is expected to equal nil - .new - is expected to equal true - #identifier - is expected to equal true - #parent_class - when no parent class is specified - is expected to equal nil - when a parent class is specified - is expected to equal true - -RuboCop::AST::OrNode + #value + is expected to eq 10 .new - with a semantic or node - is expected to equal true - with a logical or node - is expected to equal true - #alternate_operator - with a semantic or node - is expected to eq "||" - with a logical or node - is expected to eq "or" - #inverse_operator - with a logical or node - is expected to eq "&&" - with a semantic or node - is expected to eq "and" - #operator - with a logical or node - is expected to eq "||" - with a semantic or node - is expected to eq "or" - #rhs - with a semantic or node - is expected to equal true - with a logical or node - is expected to equal true - #logical_operator? - with a logical or node - is expected to equal true - with a semantic or node - is expected to equal false - #semantic_operator? - with a logical or node - is expected to equal false - with a semantic or node - is expected to equal true - #lhs - with a logical or node - is expected to equal true - with a semantic or 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 RuboCop::AST::Token #line returns line of token - #space_before - returns nil when it is on the first line - returns nil when there is not a space before token - returns truthy MatchData when there is a space before token + #column + returns index of first char in token range on that line type predicates - #rescue_modifier? - returns false for non rescue modifier tokens - returns true for rescue modifier tokens - #comma? - returns false for non comma tokens - returns true for comma tokens + with braces & parens + #left_curly_brace? + returns false for non left block brace tokens + returns true for left block brace tokens + #right_curly_brace? + returns false for non right brace tokens + returns true for all right brace tokens + #right_parens? + returns false for non right parens tokens + returns true for right parens tokens + #left_parens? + returns false for non left parens tokens + returns true for left parens tokens + #left_brace? + returns true for left hash brace tokens + returns false for non left hash brace tokens + #end? + returns false for non end tokens + returns true for end tokens + #left_ref_bracket? + returns false for non left_ref_bracket tokens + returns true for left_ref_bracket tokens #comment? - returns false for non comment tokens returns true for comment tokens + returns false for non comment tokens #equals_sign? - returns true for equals sign tokens returns false for non equals sign tokens + returns true for equals sign tokens #left_bracket? returns false for non left_bracket tokens returns true for all left_bracket tokens + #left_array_bracket? + returns true for left_array_bracket tokens + returns false for non left_array_bracket tokens + #right_bracket? + returns true for all right_bracket tokens + returns false for non right_bracket tokens + #comma? + returns false for non comma tokens + returns true for comma tokens #semicolon? returns true for semicolon tokens returns false for non semicolon tokens - #end? - returns false for non end tokens - returns true for end tokens - #left_array_bracket? - returns false for non left_array_bracket tokens - returns true for left_array_bracket tokens - #left_ref_bracket? - returns false for non left_ref_bracket tokens - returns true for left_ref_bracket tokens - with braces & parens - #right_curly_brace? - returns true for all right brace tokens - returns false for non right brace tokens - #left_curly_brace? - returns false for non left block brace tokens - returns true for left block brace tokens - #left_parens? - returns true for left parens tokens - returns false for non left parens tokens - #left_brace? - returns false for non left hash brace tokens - returns true for left hash brace tokens - #right_parens? - returns true for right parens tokens - returns false for non right parens tokens #left_brace? - returns true for right_bracket tokens returns false for non right_bracket tokens - #right_bracket? - returns false for non right_bracket tokens - returns true for all right_bracket tokens + returns true for right_bracket tokens + #rescue_modifier? + returns true for rescue modifier tokens + returns false for non rescue modifier tokens .from_parser_token + sets parser token's range to rubocop token's pos + 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 - returns a #to_s useful for debugging - sets parser token's range to rubocop token's pos - #column - returns index of first char in token range on that line + #space_after + returns truthy MatchData when there is a space after token + returns nil when there is not a space after token #end_pos returns index of last char in token range of entire source - #to_s - returns string of token data + #space_before + 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 #begin_pos returns index of first char in token range of entire source - #space_after - returns nil when there is not a space after token - returns truthy MatchData when there is a space after token - -RuboCop::AST::WhileNode - #keyword - is expected to eq "while" - #loop_keyword? - with a modifier while - is expected to be truthy - with a statement while - is expected to be truthy - #post_condition_loop? - with a modifier while - is expected to be truthy - with a statement while - is expected to be falsey - #inverse_keyword - is expected to eq "until" - .new - with a statement while - is expected to equal true - with a modifier while - is expected to equal true - #do? - without a do keyword - is expected to be falsey - with a do keyword - is expected to be truthy + #to_s + returns string of token data -RuboCop::AST::ReturnNode - behaves like wrapped arguments node - #arguments - 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 - with no arguments and braces - is expected to equal true - with a single argument - is expected to eq 1 - with a single argument and braces - is expected to eq 1 - .new - without arguments - is expected to equal true - with arguments +RuboCop::AST::ProcessedSource + #blank? + with source with content + returns false + with source of no content + returns true + #tokens + has an array of tokens + #comments + is an array of comments + when the source is invalid + returns [] + #ast + is the root node of AST + #path + is the path passed to .new + #following_line + returns source of line after token + .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 + valid_syntax? + when the source is completely valid + returns true + when the source is invalid + returns false + when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI + returns true + when a line starts with an integer literal + tokenizes the source correctly + when the source could not be parsed due to encoding error + returns false + when the source is valid but has some warning diagnostics + returns true + token enumerables + #each_token + yields all tokens + #find_token + yields correct token + yields nil when there is no match + #buffer + is a source buffer + #start_with? + with present source + returns true when passed string that starts source + returns false when passed string that does not start source + with blank source + returns false + with heavily commented source + #line_with_comment? + returns true for lines with comments + returns false for lines without comments + #each_comment_in_lines + yields the comments + #contains_comment? + provided a multiline source_range with at least one line with comment is expected to equal true - -RuboCop::AST::LambdaNode - #arguments - is expected to eq 2 - #method_name - is expected to eq :lambda - #receiver - is expected to eq nil - -RuboCop::AST::ArgsNode - .new - with a method definition - is expected to equal true - with a block - is expected to equal true - with a lambda literal - is expected to equal true - #empty_and_without_delimiters? - with arguments - with a lambda literal - is expected to equal false - with a method definition - is expected to equal false - with delimiters - with a method definition - is expected to equal false - with a lambda literal - is expected to equal false - with a block + provided source_range on line without comment is expected to equal false - with empty arguments - with a lambda literal - is expected to equal true - with a method definition + provided source_range on comment line is expected to equal true - with a block + provided source_range on line with comment is expected to equal true + #comments_before_line + returns comments on or before given line + #comment_at_line + returns nil if line has no comment + returns the comment at the given line number + #each_comment + yields all comments + #find_comment + yields correct comment + yields nil when there is no match + #[] + when start index and length are passed + returns the array of lines + when a range is passed + returns the array of lines + when an index is passed + returns the line + #file_path + returns file path + #lines + is an array + contains lines as string without linefeed + has same number of elements as line count + #preceding_line + returns source of line before token + #parser_error + 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 + when the source was properly parsed + is nil -RuboCop::AST::IfNode - #branches - with an elsif statement - is expected to eq 3 - is expected to all be literal - with an if statement - is expected to eq 1 - is expected to all be literal - with an else statement - is expected to all be literal - is expected to eq 2 - with an unless statement - is expected to all be literal - is expected to eq 1 - #modifier_form? - with a non-modifier if statement - is expected to be falsey - with a modifier unless statement - is expected to be truthy - with a modifier if statement +RuboCop::AST::ForNode + #post_condition_loop? + is expected to be falsey + #collection + is expected to equal true + #loop_keyword? + is expected to be truthy + #body + is expected to equal true + #void_context? + with a do keyword 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 - #elsif_conditional? - with multiple elsif conditionals + without a do keyword is expected to be truthy - with nested conditionals in else clause - is expected to be falsey - with one elsif conditional + #variable + is expected to equal true + #do? + with a do keyword is expected to be truthy - with nested conditionals in if clause + without a do keyword is expected to be falsey - 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 - #nested_conditional? - with no nested conditionals + #keyword + is expected to eq "for" + .new + is expected to equal true + +RuboCop::AST::ArrayNode + .new + is expected to equal true + #square_brackets? + with a percent literal 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 - with nested conditionals in elsif clause - is expected to be truthy - with nested conditionals in else clause + with square brackets is expected to be truthy - #if_branch - with an unless statement - is expected to equal true - with an if statement + #bracketed? + with a percent literal is expected to equal true - with a ternary operator + with square brackets is expected to equal true - #keyword - with an if statement - is expected to eq "if" - with a ternary operator - is expected to eq "" - with an unless statement - is expected to eq "unless" - #ternary? - with an unless statement + unbracketed + is expected to equal nil + #percent_literal? + with square brackets is expected to be falsey - with a ternary operator - is expected to be truthy - with an if statement 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 + with a symbol percent literal is expected to be falsey - #else_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 - #inverse_keyword? - with an if statement - is expected to eq "unless" - with an unless statement - is expected to eq "if" - with a ternary operator - is expected to eq "" - .new - with a regular if statement - is expected to equal true - with a ternary operator - is expected to equal true - with a modifier statement - is expected to equal true - #elsif? - without an elsif statement - is expected to be falsey - with an if statement comtaining an elsif - is expected to be falsey - with an elsif statement is expected to be truthy - #unless? - with an unless statement + with a string percent literal is expected to be truthy - with a ternary operator is expected to be falsey - with an if statement - is expected to be falsey - #each_branch - when not passed a block - is expected to equal true - when passed a block - yields all the branches - -RuboCop::AST::WhenNode - .new - is expected to equal true - #branch_index - is expected to eq 1 - is expected to eq 0 - is expected to eq 2 - #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 - #each_condition - when passed a block - yields all the conditions - when not passed a block - 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 + #each_value + without block is expected to equal true - -RuboCop::AST::SelfClassNode - #body - with a single expression body + with block is expected to equal true - with a multi-expression body + is expected to eq ["(int 1)", "(int 2)", "(int 3)"] + #values + with an empty array is expected to equal true - with an empty body - is expected to equal nil - .new - is expected to equal true - #identifier - is expected to equal true + with an array of literals + is expected to all be literal + is expected to eq 3 + with an array of variables + is expected to all be send type + is expected to eq 2 + +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 and braces + is expected to equal true + with a single argument and braces + is expected to eq 1 + with a single splat argument + is expected to eq 1 + with a single argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + with no arguments + is expected to equal true RuboCop::AST::Node - #class_definition? - with self singleton class - matches - with inheritance - matches - with Struct - matches - without inheritance - matches - with ::ClassName - matches - namespaced class - matches - constant defined as Struct without block - does not match - with object singleton class - matches - with Class.new - matches - #value_used? - within a method call node - is always true - within a module definition node - is always true - within a singleton class node - is always true - within a while node - is true only for the condition - at the top level - is false - within a class 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 - within an array literal - assigned to an ivar - is always true - at the top level - is always false - at the end of a block - is always true - #struct_constructor? - struct definition without block - does not match - ::Struct - matches - struct definition with a block - matches #argument_type? block arguments returns true for all argument types method arguments returns true for all argument types - #sibling_index - returns its sibling index #pure? - for a gvar assignment - returns false for a module definition returns false - for a cvar assignment + for a class definition + returns false + for a gvar assignment returns false for an integer literal returns true - for a hash literal + for an lvar assignment + returns false + for an array literal which contains a method call returns false with only literal children @@ -2556,430 +2274,465 @@ returns true with options returns true - for a method call - returns false - for an lvar assignment + for a nested if + where the innermost descendants are local vars and literals + returns true + where one branch contains an assignment statement + returns false + where one branch contains a method call + returns false + for a cvar assignment returns false - for a class definition + for a method call returns false - for an array literal + for a hash literal which contains a method call returns false with only literal children returns true for an ivar assignment returns false - for a nested if - where one branch contains a method call - returns false - where the innermost descendants are local vars and literals - returns true - where one branch contains an assignment statement - returns false #module_definition? - with Module.new + using module keyword matches with ::ModuleName matches - namespaced modules + included module definition + matches + with Module.new matches nested modules matches - using module keyword + namespaced modules matches prepend Module.new matches - included module definition + #struct_constructor? + struct definition with a block matches - #class_constructor? - class definition with a block + struct definition without block + does not match + ::Struct matches - class definition on outer scope + #class_definition? + without inheritance matches - module definition with a block + with Struct + matches + with inheritance + matches + with Class.new + matches + constant defined as Struct without block + does not match + namespaced class matches + with ::ClassName + matches + with object singleton class + matches + with self singleton class + matches + #class_constructor? class definition does not match + class definition on outer scope + matches + module definition with a block + matches + class definition with a block + matches #recursive_basic_literal? behaves like literal - returns true for `/./` + returns true for `(false && true)` behaves like literal returns true for `1` behaves like literal - returns true for `{ :a => 1, :b => 2 }` - behaves like literal - returns true for `!true` - behaves like literal - returns true for `nil` + returns true for `"#{2}"` behaves like literal - returns true for `'str'` + returns true for `{ :a => 1, :b => 2 }` behaves like literal returns true for `false` behaves like non literal - returns false for `/.#{some_method_call}/` + returns false for `(x && false)` behaves like literal returns true for `(false <=> true)` behaves like literal - returns true for `[1, 2, 3]` - behaves like literal - returns true for `{ a: 1, b: 2 }` - behaves like non literal - returns false for `(x == false)` - behaves like non literal - returns false for `some_method_call(x, y)` - behaves like literal returns true for `1.0` - behaves like literal - returns true for `(1)` behaves like non literal - returns false for `(x or false)` + returns false for `%r{abx#{foo}}ixo` + behaves like literal + returns true for `!true` behaves like non literal - returns false for `{ some_method_call => :sym }` + returns false for `/.#{some_method_call}/` behaves like non literal returns false for `{ :sym => some_method_call }` - behaves like literal - returns true for `"#{2}"` behaves like non literal - returns false for `(x && false)` - behaves like literal - returns true for `(false && true)` + returns false for `some_method_call` behaves like literal returns true for `%r{abx}ixo` behaves like non literal - returns false for `%r{abx#{foo}}ixo` + returns false for `{ some_method_call => :sym }` behaves like non literal - returns false for `some_method_call` + returns false for `some_method_call(x, y)` + behaves like non literal + returns false for `(x == false)` + behaves like non literal + returns false for `[some_method_call]` + behaves like literal + returns true for `{ a: 1, b: 2 }` + behaves like literal + returns true for `(1)` behaves like literal returns true for `(false or true)` + behaves like literal + returns true for `'str'` behaves like non literal - returns false for `[some_method_call]` + returns false for `(x or false)` + behaves like literal + returns true for `nil` + behaves like literal + returns true for `/./` + behaves like literal + returns true for `[1, 2, 3]` + #value_used? + within an if...else..end node + nested in a method call + is always true + at the top level + is true only for the condition + at the top level + is false + within a while node + is true only for the condition + within an array literal + assigned to an ivar + is always true + at the top level + is always false + within a singleton class node + is always true + within a class definition node + is always true + within a module definition node + is always true + at the end of a block + is always true + within a method call node + is always true + #sibling_index + returns its sibling index -RuboCop::AST::SendNode - #assignment_method? - with a regular method - is expected to be falsey - with a comparison method - is expected to be falsey - with an assignment method - is expected to be truthy - with a bracket assignment method - is expected to be truthy - #implicit_call? - with an implicit call method - is expected to be truthy - with a regular method - is expected to be falsey - with an explicit call method - is expected to be falsey - #nonmutating_array_method? - with a mutating Array method - is expected to be falsey - with a regular method - is expected to be falsey - with a nonmutating Array method - is expected to be truthy - #last_argument - with a single splat argument +RuboCop::AST::RegexpNode + #percent_r_literal? + with /-delimiters + is expected to eq false + 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 multi-line %r{-delimiters + is expected to eq true + #content + with an empty regexp with option + is expected to eq "" + with a regexp without option + 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" + with an empty regexp + is expected to eq "" + with a multi-line regexp with option + is expected to eq "\n.+\n" + #extended? + with only x option is expected to equal true - with multiple mixed arguments + with other options + is expected to equal false + with no options + is expected to equal false + with x and other options is expected to equal true - with a single literal argument + #multiline_mode? + with m and other options is expected to equal true - with multiple literal arguments + with only m option is expected to equal true - with no arguments + with other options + is expected to equal false + with no options + is expected to equal false + #delimiter? + with %r{-delimiters + 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 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 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 + with %r<-delimiters + 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 false + is expected to eq false + is expected to eq true + 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 false + is expected to eq false + is expected to eq true + is expected to eq false + with /-delimiters + is expected to eq true + is expected to eq false + #interpolation? + 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 + #to_regexp + with a regexp with an "o" option + is expected to eq "/abc/i" + with a multi-line regexp without option + is expected to eq / +.+ +/ + with an empty regexp + is expected to eq // + with a regexp with option + is expected to eq /.+/mix + with a multi-line regexp with option + is expected to eq / +.+ +/ix + with an empty regexp with option + is expected to eq //ix + with a regexp without option + is expected to eq /.+/ + #ignore_case? + with other options + is expected to equal false + with no options + is expected to equal false + with i and other options is expected to equal true - #command? - when argument is a string - with an explicit receiver - is expected to be falsey - with an implicit receiver - is expected to be truthy - when argument is a symbol - with an explicit receiver - is expected to be falsey - with an implicit receiver - is expected to be truthy - #lambda? - 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 - with a method named lambda in a class - is expected to be falsey - #arithmetic_operation? - with a unary numeric operation - is expected to be falsey - with a regular method call - is expected to be falsey - with a binary arithmetic operation - is expected to be truthy - #self_receiver? - with an implicit receiver - is expected to be falsey - with a self receiver - is expected to be truthy - with a non-self receiver - is expected to be falsey - #nonmutating_string_method? - with a nonmutating String method - is expected to be truthy - with a mutating String method - is expected to be falsey - with a regular method - is expected to be falsey - #double_colon? - without a dot - is expected to be falsey - with a dot - is expected to be falsey - with a double colon - is expected to be truthy - with a unary method - is expected to be falsey - #prefix_not? - with a bang method - is expected to be falsey - with a non-negated method - is expected to be falsey - with keyword `not` + with only i option + is expected to equal true + .new + is expected to equal true + #slash_literal? + with %r<-delimiters + is expected to eq false + with multi-line %r{-delimiters + is expected to eq false + with /-delimiters + is expected to eq true + with %r{-delimiters + is expected to eq false + with %r/-delimiters + is expected to eq false + #regopt + with a regexp without option + is expected to equal true + is expected to equal true + with an empty regexp with option + is expected to equal true + is expected to eq [:i, :x] + with an empty regexp + is expected to equal true + is expected to equal true + with a multi-line regexp with option + is expected to equal true + is expected to eq [:i, :m, :x] + with a multi-line regexp without option + is expected to equal true + is expected to equal true + with a regexp with option + is expected to equal true + is expected to eq [:i, :m, :x] + #no_encoding? + 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 + with other options + is expected to equal false + #delimiters + with %r<-delimiters + is expected to eq ["<", ">"] + with %r{-delimiters + is expected to eq ["{", "}"] + with multi-line %r{-delimiters + is expected to eq ["{", "}"] + with %r/-delimiters + is expected to eq ["/", "/"] + with /-delimiters + is expected to eq ["/", "/"] + #single_interpolation? + with no options + is expected to equal false + with o and other options + is expected to equal true + with other options + is expected to equal false + with only o option + is expected to equal true + +RuboCop::AST::SuperNode + #arguments? + with a single literal argument is expected to be truthy - #def_modifier? - with several prefixed def modifiers + with multiple mixed arguments is expected to be truthy - with a prefixed def modifier + with a single splat argument is expected to be truthy - #dot? - without a dot - is expected to be falsey - with a unary method - is expected to be falsey - with a dot + with multiple literal arguments is expected to be truthy - with a double colon - is expected to be falsey - #loop_keyword? - is expected to equal false - #block_argument? with no arguments is expected to be falsey - with a block argument - is expected to be truthy - with regular arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - #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 does not have an argument - is expected to be falsey - 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 + #dot? + is expected to be falsey + #implicit_call? + is expected to be falsey + #double_colon? + is expected to be falsey #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 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 - #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 - #binary_operation?? - with a regular method call - is expected to equal false - with an implicit call method - is expected to equal false - with a binary operation - is expected to equal true - with a unary operation - is expected to equal false - #bare_access_modifier? - when node is a bare `module_function` - is expected to be truthy - when node has an argument - is expected to be falsey - when node is a bare `private` - is expected to be truthy - when node is a bare `public` - 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 - #access_modifier? - when node is a non-bare `module_function` - is expected to be truthy - when node is a non-bare `private` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node is a non-bare `public` - is expected to be truthy - when node is a non-bare `protected` - is expected to be truthy - when node is a bare `module_function` - is expected to be truthy - when node is a bare `protected` - is expected to be truthy - when node is a bare `public` - is expected to be truthy - when node is a bare `private` - is expected to be truthy - #splat_argument? - with regular arguments - is expected to be falsey - with a splat argument - is expected to be truthy + #camel_case_method? + is expected to be falsey + #arguments + 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 be falsey - with mixed arguments - is expected to be truthy - #lambda_literal? - with `a.() {}` style method - is expected to be falsey - with a non-lambda method - is expected to be falsey - with a stabby lambda is expected to equal true - with a lambda method - is expected to equal false - #nonmutating_operator_method? - with a nonmutating binary operator method - is expected to be truthy - with a regular method - is expected to be falsey - with a nonmutating unary operator method - is expected to be truthy - with a mutating binary operator method - is expected to be falsey - #comparison_method? - with a negation method - is expected to be falsey - with a comparison method - is expected to be truthy - with a regular method - is expected to be falsey - #post_condition_loop? - is expected to equal false - #enumerable_method? - with a regular method - is expected to be falsey - with an enumerable method - is expected to be truthy - #operator_method? - with a binary operator method + with a single splat argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + #assignment_method? + is expected to be falsey + #self_receiver? + is expected to be falsey + #command? + when argument is a symbol 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 unary operator method + when argument is a string is expected to be truthy - #receiver - with no receiver - is expected to equal true - with a literal receiver - is expected to equal true - with a variable receiver - is expected to equal true - #unary_operation? - with a binary operation - is expected to equal false - with a regular method call - is expected to equal false - with a unary operation + #first_argument + with multiple mixed arguments is expected to equal true - with an implicit call method - is expected to equal false - .new - with a safe navigation method send + with a single literal argument is expected to equal true - with a regular method send + with no arguments is expected to equal true - #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? - with a single literal argument - is expected to be truthy with a single splat argument - is expected to be truthy - with no arguments - is expected to be falsey + is expected to equal true with multiple literal arguments - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - #method_name - with a plain method - is expected to eq :bar - with an operator method - is expected to eq :== - with an implicit call method - is expected to eq :call - with a setter method - is expected to eq :bar= - #arguments - with a single splat argument - is expected to eq 1 + is expected to equal true + #last_argument with no arguments is expected to equal true with multiple literal arguments - is expected to eq 2 + is expected to equal true with a single literal argument - is expected to eq 1 + is expected to equal true with multiple mixed arguments - is expected to eq 2 - #nonmutating_binary_operator_method? - with a mutating binary operator method - is expected to be falsey - with a regular method + is expected to equal true + with a single splat argument + is expected to equal true + #block_argument? + with regular arguments is expected to be falsey - with a nonmutating binary operator method + with mixed arguments is expected to be truthy - #negation_method? - with prefix `not` + with a block argument is expected to be truthy - with a non-negated method - is expected to be falsey - with suffix `not` + with no arguments is expected to be falsey - with prefix bang + #splat_argument? + with a splat argument is expected to be truthy - #nonmutating_unary_operator_method? - with a regular method + with no arguments is expected to be falsey - with a nonmutating unary operator method + with regular arguments + is expected to be falsey + with mixed arguments is expected to be truthy + #method_name + is expected to eq :super #block_node + with no block + is expected to equal true + with a block literal + is expected to equal true with a block argument is expected to equal true + #predicate_method? + is expected to be falsey + #operator_method? + is expected to be falsey + #const_receiver? + is expected to be falsey + #block_literal? + with a block literal + is expected to be truthy + with a block argument + is expected to be falsey with no block + is expected to be falsey + #receiver + is expected to equal true + #bang_method? + is expected to be falsey + #comparison_method? + is expected to be falsey + #setter_method? + is expected to be falsey + .new + with a zsuper node is expected to equal true - with a block literal + with a super node is expected to equal true + #macro? + is expected to be falsey #parenthesized? with arguments when not using parentheses @@ -2987,656 +2740,821 @@ 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 - #camel_case_method? - with a camel case method - is expected to be truthy - with a regular method - is expected to be falsey - #predicate_method? - with a predicate method - is expected to be truthy - with a regular method - is expected to be falsey - with a bang method - is expected to be falsey - #nonmutating_hash_method? - with a nonmutating Hash method - is expected to be truthy - with a mutating Hash method - is expected to be falsey - with a regular 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 - #macro? - without a receiver - without a parent - is expected to be truthy - when parent is a module + when using parentheses is expected to be truthy - when parent is a class constructor + +RuboCop::AST::OrNode + .new + with a semantic or node + is expected to equal true + with a logical or node + is expected to equal true + #inverse_operator + with a logical or node + is expected to eq "&&" + with a semantic or node + is expected to eq "and" + #operator + with a semantic or node + is expected to eq "or" + with a logical or node + is expected to eq "||" + #logical_operator? + with a semantic or node + is expected to equal false + with a logical or node + is expected to equal true + #rhs + with a semantic or node + is expected to equal true + with a logical or node + is expected to equal true + #lhs + with a semantic or node + is expected to equal true + with a logical or node + is expected to equal true + #alternate_operator + with a logical or node + is expected to eq "or" + with a semantic or node + is expected to eq "||" + #semantic_operator? + with a logical or node + is expected to equal false + with a semantic or node + is expected to equal true + +RuboCop::AST::PairNode + #key_delta + with alignment set to :left + when using hash rocket delimiters + 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 key is a keyword splat + is expected to eq 0 + when both keys are explicit keys + is expected to eq 0 + 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 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 colon delimiters + when keys 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 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 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 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 + 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 keys 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 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 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 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 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 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 both pairs are explicit pairs + is expected to eq 2 + when second pair is a keyword splat + is expected to eq 0 + #same_line? + when pairs are on separate lines + when both pairs are explicit pairs + is expected to be falsey + when last pair is a keyword splat + is expected to be falsey + when a multiline pair shares the same line + when both pairs are explicit pairs is expected to be truthy - when parent is a keyword begin inside of an class is expected to be truthy - when parent is a singleton class + when last pair is a keyword splat is expected to be truthy - when parent is a method definition - is expected to be falsey - when parent is a begin without a parent is expected to be truthy - when parent is a class + when both pairs are on the same line + when both pairs are explicit pairs is expected to be truthy - when parent is a block + when both pair is a keyword splat is expected to be truthy - with a receiver - when parent is a module - is expected to be falsey - when parent is a class - 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 - #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 - #first_argument - with no arguments - is expected to equal true - with a single splat argument - is expected to equal true - with multiple mixed arguments - is expected to equal true - with a single literal argument + #key + when using a symbol key is expected to equal true - with multiple literal arguments + when using a string key is expected to equal true - #setter_method? - with a setter method + #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 ":" + #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 - with an indexed setter method + #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 " => " + #colon? + when using a colon delimiter is expected to be truthy - with a regular method + when using a hash rocket delimiter is expected to be falsey - with an operator method + #value + is expected to equal true + .new + is expected to equal true + #hash_rocket? + when using a hash rocket delimiter + is expected to be truthy + when using a colon delimiter is expected to be falsey + #value_delta + when using colon delimiters + when both pairs are on the same line + 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 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 using hash rocket delimiters + when receiver value is ahead + is expected to eq 2 + when both pairs are on the same line + is expected to eq 0 + 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 RuboCop::AST::BreakNode behaves like wrapped arguments node .new - with arguments - is expected to equal true without arguments is expected to equal true + with arguments + is expected to equal true #arguments + with multiple literal arguments + is expected to eq 2 with no arguments is expected to equal true - with a single splat argument - is expected to eq 1 - with a single argument + with a single argument and braces is expected to eq 1 with no arguments and braces is expected to equal true - with a single argument and braces + with a single splat argument + is expected to eq 1 + with a single argument is expected to eq 1 - with multiple literal arguments - is expected to eq 2 -RuboCop::AST::ProcessedSource - #lines - contains lines as string without linefeed - has same number of elements as line count - is an array - #[] - when start index and length are passed - returns the array of lines - when an index is passed - returns the line - when a range is passed - returns the array of lines - #comments - is an array of comments - when the source is invalid - returns [] - #tokens - has an array of tokens - token enumerables - #each_token - yields all tokens - #find_token - yields nil when there is no match - yields correct token - #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 could not be parsed due to encoding error - returns the error - when the source was properly parsed - is nil - #ast - is the root node of AST - valid_syntax? - when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI - returns true - when the source is completely valid - returns true - when the source is valid but has some warning diagnostics - returns true - 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 - #blank? - with source of no content - returns true - with source with content - returns false - .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 - #following_line - returns source of line after token - #file_path - returns file path - #path - is the path passed to .new - #buffer - is a source buffer - #preceding_line - returns source of line before token - with heavily commented source - #comments_before_line - returns comments on or before given line - #contains_comment? - provided source_range on line with comment - 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 without comment - is expected to equal false - provided source_range on comment line - is expected to equal true - #each_comment - yields all comments - #find_comment - yields nil when there is no match - yields correct comment - #comment_at_line - returns the comment at the given line number - returns nil if line has no comment - #each_comment_in_lines - yields the comments - #line_with_comment? - returns true for lines with comments - returns false for lines without comments - #start_with? - with present source - returns true when passed string that starts source - returns false when passed string that does not start source - with blank source - returns false +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 + is expected to equal true 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 splat argument + with no arguments + is expected to equal true + with multiple literal arguments + is expected to eq 2 + with a single argument is expected to eq 1 with no arguments and braces is expected to equal true with a single argument and braces is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with no arguments - is expected to equal true - with a single argument + with a single splat argument is expected to eq 1 + .new + without arguments + is expected to equal true + with arguments + is expected to equal true -RuboCop::AST::YieldNode - #implicit_call? - is expected to be falsey - #block_node +RuboCop::AST::ResbodyNode + #exception_variable + for an explicit rescue + is expected to eq "ex" + when an exception variable is not given + is expected to equal nil + for an implicit rescue + is expected to eq "ex" + #body is expected to equal true - #const_receiver? - is expected to be falsey - #operator_method? - is expected to be falsey - #splat_argument? - with regular arguments + .new + is expected to equal true + +RuboCop::AST::CaseNode + #else? + with an else statement + is expected to be truthy + without an else statement is expected to be falsey - with a splat argument + #each_when + 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 + #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 + #keyword + is expected to eq "case" + .new + is expected to equal true + #when_branches + is expected to all be when type + is expected to eq 3 + +RuboCop::AST::DefNode + #assignment_method? + with a comparison method + is expected to be falsey + with an assignment method is expected to be truthy - with mixed arguments + with a bracket assignment method is expected to be truthy - with no arguments + with a regular method is expected to be falsey - #comparison_method? - is expected to be falsey - #method_name - is expected to eq :yield - #parenthesized? + #first_argument + with a single regular argument + is expected to equal true + with multiple regular arguments + is expected to equal true + with a single rest argument + is expected to equal true + with multiple mixed arguments + is expected to equal true 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 - #arguments? - with a single literal argument + is expected to equal true + with a single keyword argument + is expected to equal true + #operator_method? + with a binary operator method is expected to be truthy - with no arguments + with a regular method is expected to be falsey - with multiple mixed arguments - is expected to be truthy - with a single splat argument + with a unary operator method is expected to be truthy - with multiple literal arguments + with a setter method + is expected to be falsey + #bang_method? + with a bang method is expected to be truthy + with a regular method + is expected to be falsey + with a predicate method + is expected to be falsey + #arguments + with a single rest argument + is expected to eq 1 + with no arguments + is expected to equal true + 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 + with multiple regular arguments + is expected to eq 2 #last_argument - with a single literal argument + with a single rest argument is expected to equal true - with a single splat argument + with a single keyword argument + is expected to equal true + with a single regular argument + is expected to equal true + with multiple regular arguments is expected to equal true with no arguments is expected to equal true with multiple mixed arguments is expected to equal true - with multiple literal arguments + #body + with no body is expected to equal true - #setter_method? - is expected to be falsey - #camel_case_method? - is expected to be falsey - .new - is expected to equal true + with a single expression body + is expected to equal true + with a multi-expression body + is expected to equal true + #predicate_method? + with a regular method + is expected to be falsey + with a predicate method + is expected to be truthy + with a bang method + is expected to be falsey + #void_context? + with a regular method + is expected to be falsey + with a regular assignment method + is expected to be truthy + with a bracket assignment method + is expected to be truthy + with a comparison method + is expected to be falsey + with an initializer method + is expected to be truthy #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 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 - #predicate_method? - is expected to be falsey - #dot? - is expected to be falsey - #macro? - is expected to be falsey - #arguments - with a single splat argument - is expected to eq 1 - 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 no arguments + #method_name + with a setter method + is expected to eq :foo= + with a unary method + is expected to eq :-@ + with an operator method + is expected to eq :== + with a plain method + is expected to eq :foo + #receiver + with a singleton method definition is expected to equal true - #first_argument - with a single literal argument + with an instance method definition is expected to equal true - with multiple literal arguments + with a class method definition is expected to equal true - with a single splat argument + #comparison_method? + with a comparison method + is expected to be truthy + with a regular method + is expected to be falsey + .new + with a defs node is expected to equal true - with multiple mixed arguments + with a def node is expected to equal true + #self_receiver? + with a singleton method definition + is expected to be falsey + with an instance method definition + is expected to be falsey + with a class method definition + is expected to be truthy + #camel_case_method? + with a regular method + is expected to be falsey + with a camel case method + is expected to be truthy + when using Ruby 2.7 or newer + #argument_forwarding? + is expected to be truthy + #rest_argument? + with mixed arguments + is expected to be truthy with no arguments - is expected to equal true + is expected to be falsey + with a rest argument + is expected to be truthy + with regular arguments + is expected to be falsey + #const_receiver? + with a singleton method definition + is expected to be truthy + with an instance method definition + is expected to be falsey + with a class method definition + is expected to be falsey #block_argument? - is expected to be falsey - #command? - when argument is a string + with a block argument is expected to be truthy - when argument is a symbol + with no arguments + is expected to be falsey + with regular arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + #arguments? + with a single keyword argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + with a single regular argument + is expected to be truthy + with multiple regular arguments + is expected to be truthy + with no arguments + is expected to be falsey + with a single rest argument is expected to be truthy - #block_literal? - is expected to be falsey - #double_colon? - is expected to be falsey - #assignment_method? - is expected to be falsey - #receiver - is expected to equal true - #bang_method? - is expected to be falsey - #self_receiver? - is expected to be falsey -RuboCop::AST::SymbolNode - .new - with a symbol node +RuboCop::AST::CaseMatchNode + when using Ruby 2.7 or newer + .new is expected to equal true - #value - is expected to eq :foo - -RuboCop::AST::ResbodyNode - #body - is expected to equal true - #exception_variable - for an implicit rescue - is expected to eq "ex" - when an exception variable is not given - is expected to equal nil - for an explicit rescue - is expected to eq "ex" - .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 + #keyword + is expected to eq "case" + #each_in_pattern + when passed a block + yields all the conditions + when not passed a block + is expected to equal true + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal false + #in_pattern_branches + is expected to eq 3 + is expected to all be in pattern type RuboCop::AST::DefinedNode - #method_name - is expected to eq :defined? - #arguments - is expected to all be sym type - is expected to eq 1 - #receiver - is expected to eq nil .new with a defined? node is expected to equal true + #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? -RuboCop::AST::AndNode - #rhs - with a semantic and node - is expected to equal true - with a logical and node - is expected to equal true - #lhs - with a logical and node - is expected to equal true - with a semantic and node - is expected to equal true - #alternate_operator - with a semantic and node - is expected to eq "&&" - with a logical and node - is expected to eq "and" - #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 +RuboCop::AST::IfNode + #if? + with a ternary operator + is expected to be falsey + with an unless statement + is expected to be falsey + with an if statement + is expected to be truthy + #else_branch + with an unless statement is expected to equal true - with a semantic and node - is expected to equal false - .new - with a semantic and node + with a ternary operator is expected to equal true - with a logical and node + with an if statement 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 "&&" - #semantic_operator? - with a logical and node - is expected to equal false - with a semantic and node + #elsif? + with an elsif statement + is expected to be truthy + with an if statement comtaining an elsif + is expected to be falsey + without an elsif statement + is expected to be falsey + #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 + #keyword + with an unless statement + is expected to eq "unless" + with an if statement + is expected to eq "if" + with a ternary operator + is expected to eq "" + #elsif_conditional? + with one elsif conditional + is expected to be truthy + 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 multiple elsif conditionals + is expected to be truthy + with nested conditionals in if clause + is expected to be falsey + with nested conditionals in else clause + is expected to be falsey + #branches + with an unless statement + is expected to eq 1 + is expected to all be literal + with an else statement + is expected to eq 2 + is expected to all be literal + with an if statement + is expected to eq 1 + is expected to all be literal + with an elsif statement + is expected to eq 3 + is expected to all be literal + #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 + #else? + with an elsif statement + is expected to be truthy + without an else statement + is expected to be falsey + #modifier_form? + with a ternary operator + is expected to be falsey + with a modifier unless statement + is expected to be truthy + with a non-modifier unless statement + is expected to be falsey + with a non-modifier if statement + is expected to be falsey + with a modifier if statement + is expected to be truthy + #each_branch + when not passed a block is expected to equal true - -RuboCop::AST::EnsureNode + when passed a block + yields all the branches .new - is expected to equal true - #body - is expected to equal true - -RuboCop::AST::RegexpNode - #regopt - with an empty regexp - is expected to equal true - is expected to equal true - with a regexp without option + with a ternary operator is expected to equal true + with a regular if statement is expected to equal true - with an empty regexp with option - is expected to eq [:i, :x] + with a modifier statement is expected to equal true - with a regexp with option - is expected to eq [:i, :m, :x] + #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" + #if_branch + with a ternary operator is expected to equal true - with a multi-line regexp without option + with an if statement is expected to equal true + with an unless statement is expected to equal true - with a multi-line regexp with option - is expected to eq [:i, :m, :x] + #nested_conditional? + with nested conditionals in else clause + is expected to be truthy + with no nested conditionals + is expected to be falsey + with nested ternary operators + when nested in the falsey branch + is expected to be truthy + when nested in the truthy branch + is expected to be truthy + with nested conditionals in elsif clause + is expected to be truthy + with nested conditionals in if clause + is expected to be truthy + +RuboCop::AST::ModuleNode + #identifier + is expected to equal true + #body + with a single expression body is expected to equal true - #multiline_mode? - with other options - is expected to equal false - with only m option + with an empty body + is expected to equal nil + with a multi-expression body is expected to equal true - with m and other options + .new + is expected to equal true + +RuboCop::AST::HashNode + #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 hash rocket delimiter + is expected to be falsey + #values + with an empty hash is expected to equal true - with no options - is expected to equal false - #interpolation? - with direct variable interpoation - is expected to eq true - with no interpolation returns false - is expected to eq false - with regexp quote - is expected to eq true - #content - with an empty regexp with option - is expected to eq "" - with an empty regexp - is expected to eq "" - with a multi-line regexp without option - is expected to eq "\n.+\n" - with a regexp with option - is expected to eq ".+" - with a regexp without option - is expected to eq ".+" - with a multi-line regexp with option - is expected to eq "\n.+\n" - #no_encoding? - with no options - is expected to equal false - with other options - is expected to equal false - with n and other options + with a hash with string keys + is expected to eq 2 + is expected to all be send type + with a hash with literal values + is expected to all be literal + is expected to eq 3 + #each_value + when passed a block + yields all the pairs + when not passed a block is expected to equal true - with only n option + #keys + with a hash with symbol keys + is expected to all be sym type + is expected to eq 3 + with a hash with string keys + is expected to eq 2 + is expected to all be str type + with an empty hash is expected to equal true - #percent_r_literal? - 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 - with %r<-delimiters - is expected to eq true + #braces? + with braces + is expected to be truthy + as an argument with no braces + is expected to be falsey + as an argument with braces + is expected to be truthy + #pairs_on_same_line? + with some pairs on the same line + is expected to be truthy + with all pairs on the same line + is expected to be truthy + with no pairs on the same line + is expected to be falsey .new is expected to equal true - #extended? - with no options - is expected to equal false - with only x option + #each_key + when passed a block + yields all the pairs + when not passed a block is expected to equal true - with x and other options + #pairs + with a hash of variables + is expected to eq 2 + is expected to all be pair type + with an empty hash is expected to equal true - with other options - is expected to equal false - #delimiters - with %r<-delimiters - is expected to eq ["<", ">"] - with %r/-delimiters - is expected to eq ["/", "/"] - with /-delimiters - is expected to eq ["/", "/"] - with multi-line %r{-delimiters - is expected to eq ["{", "}"] - with %r{-delimiters - is expected to eq ["{", "}"] - #single_interpolation? - with only o option + with a hash of literals + is expected to all be pair type + is expected to eq 3 + #each_pair + when not passed a block is expected to equal true - with no options + when passed a block + yields all the pairs + #empty? + with a hash containing pairs is expected to equal false - with o and other options - is expected to equal true - with other options + with a hash containing a keyword splat is expected to equal 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 false - with %r{-delimiters - 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 - 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 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 false - is expected to eq true - is expected to eq false - with /-delimiters - 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 - is expected to eq true - 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 - #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 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 - with a multi-line regexp without option - is expected to eq / -.+ -/ - #ignore_case? - with i and other options - is expected to equal true - with only i option + with an empty hash is expected to equal true - with no options - is expected to equal false - with other options - is expected to equal false - #slash_literal? - with %r{-delimiters - is expected to eq false - with %r<-delimiters - is expected to eq false - 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 -RuboCop::AST::SuperNode - #block_literal? - with a block literal +RuboCop::AST::Ext::Range + #line_span + returns the range of lines a range occupies + accepts an `exclude_end` keyword argument + +RuboCop::AST::YieldNode + #receiver + is expected to equal true + #block_node + is expected to equal true + #macro? + is expected to be falsey + #double_colon? + is expected to be falsey + #command? + when argument is a string is expected to be truthy - with a block argument - is expected to be falsey - with no block - is expected to be falsey - .new - with a zsuper node - is expected to equal true - with a super node - is expected to equal true + when argument is a symbol + is expected to be truthy + #block_literal? + is expected to be falsey + #implicit_call? + is expected to be falsey + #operator_method? + is expected to be falsey #setter_method? is expected to be falsey #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 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 - #splat_argument? - with mixed arguments - is expected to be truthy - with regular arguments - is expected to be falsey + #method_name + is expected to eq :yield + #comparison_method? + is expected to be falsey + .new + is expected to equal true + #arguments? with no arguments is expected to be falsey - with a splat argument + with multiple literal arguments is expected to be truthy - #command? - when argument is a symbol + with a single splat argument is expected to be truthy - when argument is a string + with a single literal argument is expected to be truthy + with multiple mixed arguments + is expected to be truthy + #camel_case_method? + is expected to be falsey + #block_argument? + is expected to be falsey + #assignment_method? + is expected to be falsey #parenthesized? with no arguments when using parentheses @@ -3648,163 +3566,169 @@ is expected to be truthy when not using parentheses is expected to be falsey - #first_argument + #self_receiver? + is expected to be falsey + #splat_argument? + with a splat argument + is expected to be truthy + with mixed arguments + is expected to be truthy + with no arguments + is expected to be falsey + with regular arguments + is expected to be falsey + #last_argument with a single splat argument is expected to equal true 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 - #comparison_method? - is expected to be falsey - #block_node - with a block literal - is expected to equal true - with no block - is expected to equal true - with a block argument - is expected to equal true - #last_argument - with a single literal argument - is expected to equal true 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 splat argument + #dot? + is expected to be falsey + #arguments + with no arguments is expected to equal true - #arguments? - with multiple literal arguments - is expected to be truthy with a single literal argument - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - with no arguments - is expected to be falsey + is expected to eq 1 with a single splat argument - is expected to be truthy - #method_name - is expected to eq :super - #double_colon? - is expected to be falsey - #camel_case_method? - is expected to be falsey - #arguments + 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 a single literal argument - is expected to eq 1 with multiple literal arguments is expected to eq 2 - with no arguments - is expected to equal true - #block_argument? - with mixed arguments - is expected to be truthy - with no arguments - is expected to be falsey - with regular arguments - is expected to be falsey - with a block argument - is expected to be truthy #bang_method? is expected to be falsey - #macro? - is expected to be falsey - #assignment_method? - is expected to be falsey - #self_receiver? - is expected to be falsey - #implicit_call? - is expected to be falsey #const_receiver? is expected to be falsey - #dot? - is expected to be falsey + #first_argument + 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 + with multiple mixed arguments + is expected to equal true #predicate_method? is expected to be falsey - #receiver - is expected to equal true - #operator_method? - is expected to be falsey -RuboCop::AST::ArrayNode - #values - with an array of literals +RuboCop::AST::WhenNode + #body + with a then keyword + is expected to equal true + without a then keyword + is expected to equal true + #each_condition + when not passed a block + is expected to equal true + when passed a block + yields all the conditions + #conditions + with a single condition + is expected to eq 1 + is expected to all be literal + with a multiple conditions is expected to eq 3 is expected to all be literal - with an array of variables - is expected to all be send type - is expected to eq 2 - with an empty array - is expected to equal true + #branch_index + is expected to eq 2 + is expected to eq 1 + is expected to eq 0 .new is expected to equal true - #percent_literal? - 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 truthy - is expected to be falsey - is expected to be truthy - with a symbol percent literal - is expected to be truthy + #then? + with a then keyword is expected to be truthy + without a then keyword is expected to be falsey - #bracketed? - with a percent literal - is expected to equal true - with square brackets - is expected to equal true - unbracketed + +RuboCop::AST::ClassNode + #identifier + is expected to equal true + #parent_class + when no parent class is specified is expected to equal nil - #each_value - without block + when a parent class is specified is expected to equal true - with block - is expected to eq ["(int 1)", "(int 2)", "(int 3)"] + #body + with a single expression body is expected to equal true - #square_brackets? - with square brackets - is expected to be truthy - with a percent literal - is expected to be falsey + with a multi-expression body + is expected to equal true + with an empty body + is expected to equal nil + .new + is expected to equal true -RuboCop::AST::ModuleNode - #identifier +RuboCop::AST::AliasNode + #new_identifier + is expected to eq :foo is expected to equal true .new is expected to equal true - #body - with an empty body - is expected to equal nil - with a single expression body + #old_identifier + is expected to equal true + is expected to eq :bar + +RuboCop::AST::RangeNode + .new + with an inclusive 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 an exclusive range + is expected to equal true + is expected to equal true + with a beignless range is expected to equal true - with a multi-expression body is expected to equal true -RuboCop::AST::UntilNode +RuboCop::AST::ArgsNode + #empty_and_without_delimiters? + 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 block + is expected to equal true + with a lambda literal + is expected to equal true + with a method definition + is expected to equal true + with arguments + with a lambda literal + is expected to equal false + with a method definition + is expected to equal false .new - with a statement until + with a method definition is expected to equal true - with a modifier until + with a block + is expected to equal true + with a lambda literal is expected to equal true + +RuboCop::AST::UntilNode #keyword is expected to eq "until" - #loop_keyword? + #inverse_keyword + is expected to eq "while" + #post_condition_loop? with a statement until - is expected to be truthy + is expected to be falsey with a modifier until is expected to be truthy #do? @@ -3812,124 +3736,186 @@ is expected to be truthy without a do keyword is expected to be falsey - #post_condition_loop? + #loop_keyword? with a statement until - is expected to be falsey + is expected to be truthy with a modifier until is expected to be truthy - #inverse_keyword - is expected to eq "while" - -RuboCop::AST::AliasNode .new - is expected to equal true - #new_identifier - is expected to eq :foo - is expected to equal true - #old_identifier - is expected to equal true - is expected to eq :bar + with a modifier until + is expected to equal true + with a statement until + is expected to equal true -RuboCop::AST::ForNode - #loop_keyword? - is expected to be truthy - #collection - is expected to equal true - #void_context? - without a do keyword +RuboCop::AST::FloatNode + #sign? + explicit positive float is expected to be truthy - with a do keyword + explicit negative float is expected to be truthy .new - is expected to equal true - #variable + is expected to be truthy + #value + is expected to eq 1.5 + +RuboCop::AST::SymbolNode + #value + is expected to eq :foo + .new + with a symbol node + is expected to equal true + +RuboCop::AST::StrNode + .new + with a string with interpolation + is expected to equal true + with a normal string + is expected to equal true + with a heredoc + is expected to equal true + #heredoc? + with a heredoc + is expected to equal true + with a normal string + is expected to equal false + with a string with interpolation + is expected to equal false + +RuboCop::AST::EnsureNode + .new is expected to equal true #body is expected to equal true + +RuboCop::AST::WhileNode + #keyword + is expected to eq "while" #do? without a do keyword is expected to be falsey with a do keyword is expected to be truthy - #keyword - is expected to eq "for" - #post_condition_loop? - is expected to be falsey - -RuboCop::AST::Ext::Range - #line_span - returns the range of lines a range occupies - accepts an `exclude_end` keyword argument - -RuboCop::AST::RangeNode .new - 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 - with an inclusive range + with a modifier while is expected to equal true + with a statement while is expected to equal true - -RuboCop::AST::DefNode - #self_receiver? - with a class method definition + #inverse_keyword + is expected to eq "until" + #loop_keyword? + with a modifier while is expected to be truthy - with an instance method definition + with a statement while + is expected to be truthy + #post_condition_loop? + with a modifier while + is expected to be truthy + with a statement while is expected to be falsey - with a singleton method definition + +RuboCop::AST::SendNode + #double_colon? + with a dot is expected to be falsey - #const_receiver? - with an instance method definition + with a unary method is expected to be falsey - with a class method definition + without a dot is expected to be falsey - with a singleton method definition - is expected to be truthy - when using Ruby 2.7 or newer - #argument_forwarding? + with a double colon is expected to be truthy - #arguments - with multiple mixed arguments - is expected to eq 2 - with a single regular argument - is expected to eq 1 - with no arguments - is expected to equal true - with argument forwarding - is expected to eq 1 - with a single rest argument - is expected to eq 1 - with multiple regular arguments - is expected to eq 2 - #block_argument? + #splat_argument? with regular arguments is expected to be falsey - with a block argument + with no arguments + is expected to be falsey + with a splat argument is expected to be truthy with mixed arguments is expected to be truthy + #arguments? + with multiple mixed arguments + is expected to be truthy + with multiple literal arguments + is expected to be truthy with no arguments is expected to be falsey - #receiver - with a singleton method definition - is expected to equal true - with an instance method definition + with a single splat argument + is expected to be truthy + with a single literal argument + 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 + #bang_method? + with a regular method + is expected to be falsey + with a predicate method + is expected to be falsey + with a bang method + is expected to be truthy + #macro? + with a receiver + when parent is a class + is expected to be falsey + when parent is a module + is expected to be falsey + without a receiver + when parent is a module + is expected to be truthy + when parent is a class + is expected to be truthy + when parent is a singleton class + is expected to be truthy + when parent is a keyword begin inside of an class + is expected to be truthy + when parent is a class constructor + is expected to be truthy + when parent is a method definition + is expected to be falsey + without a parent + is expected to be truthy + when parent is a begin without a parent + is expected to be truthy + when parent is a block + is expected to be truthy + #camel_case_method? + with a regular method + is expected to be falsey + with a camel case method + is expected to be truthy + #block_node + with a block argument is expected to equal true - with a class method definition + with a block literal is expected to equal true - #body - with a multi-expression body + with no block is expected to equal true - with a single expression body + #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 + #enumerable_method? + with a regular method + is expected to be falsey + with an enumerable method + is expected to be truthy + .new + with a regular method send is expected to equal true - with no body + with a safe navigation method send is expected to equal true + #implicit_call? + with an explicit call method + is expected to be falsey + with an implicit call method + is expected to be truthy + with a regular method + is expected to be falsey #operator_method? with a binary operator method is expected to be truthy @@ -3939,359 +3925,439 @@ is expected to be falsey with a unary operator method is expected to be truthy - #rest_argument? - with mixed arguments + #non_bare_access_modifier? + when node is a non-bare `module_function` is expected to be truthy - with a rest argument + when node is a non-bare `protected` is expected to be truthy - with regular arguments + when node is a non-bare `public` + is expected to be truthy + when node does not have an argument + is expected to be falsey + when node is not an access modifier is expected to be falsey + when node is a non-bare `private` + is expected to be truthy + #last_argument + with a single splat argument + is expected to equal true + with a single literal argument + is expected to equal true + with multiple literal arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true with no arguments + is expected to equal true + #comparison_method? + with a negation method is expected to be falsey - #assignment_method? with a comparison method - is expected to be falsey + is expected to be truthy with a regular method is expected to be falsey - with an assignment method + #nonmutating_operator_method? + with a nonmutating binary operator method is expected to be truthy - with a bracket assignment method + with a nonmutating unary operator method is expected to be truthy - #arguments? - with a single keyword argument + with a regular method + is expected to be falsey + with a mutating binary operator method + is expected to be falsey + #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 - with a single rest argument + #bare_access_modifier? + when node is a bare `public` is expected to be truthy - with multiple mixed arguments + when node is a bare `protected` is expected to be truthy - with a single regular argument + when node is a bare `private` is expected to be truthy - with no arguments - is expected to be falsey - with multiple regular arguments + when node is a bare `module_function` is expected to be truthy - #predicate_method? - with a bang method + when node has an argument is expected to be falsey - with a regular method + when node is not an access modifier is expected to be falsey - with a predicate method + #arithmetic_operation? + with a regular method call + is expected to be falsey + with a binary arithmetic operation is expected to be truthy + with a unary numeric operation + 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 - .new - with a def node - is expected to equal true - with a defs node - is expected to equal true + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy #method_name - with a setter method - is expected to eq :foo= + with an implicit call method + is expected to eq :call + with a plain method + is expected to eq :bar with an operator method is expected to eq :== - with a plain method - is expected to eq :foo - with a unary method - is expected to eq :-@ - #first_argument - with a single regular argument - is expected to equal true - with a single rest argument - is expected to equal true + with a setter method + is expected to eq :bar= + #block_argument? with no arguments - is expected to equal true - with a single keyword argument - is expected to equal true + is expected to be falsey + with a block argument + is expected to be truthy + with mixed arguments + is expected to be truthy + with regular arguments + is expected to be falsey + #arguments + with a single splat argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + with a single literal argument + is expected to eq 1 with multiple mixed arguments + is expected to eq 2 + with no arguments is expected to equal true - with multiple regular arguments - is expected to equal true - #camel_case_method? - with a regular method + #loop_keyword? + is expected to equal false + #dot? + with a double colon is expected to be falsey - with a camel case method + with a unary method + is expected to be falsey + with a dot is expected to be truthy - #void_context? - with a regular method + without a dot is expected to be falsey - with a comparison method + #lambda? + with a method named lambda in a class is expected to be falsey - with a regular assignment method + with a lambda method is expected to be truthy - with a bracket assignment method + with a stabby lambda method is expected to be truthy - with an initializer method + with a non-lambda method + is expected to be falsey + #nonmutating_string_method? + with a nonmutating String method + is expected to be truthy + with a mutating String method + is expected to be falsey + with a regular method + is expected to be falsey + #assignment_method? + with an assignment method is expected to be truthy - #comparison_method? with a comparison method + is expected to be falsey + with a bracket assignment method is expected to be truthy with a regular method is expected to be falsey - #bang_method? - with a regular method + #post_condition_loop? + is expected to equal false + #block_literal? + with a block literal + is expected to be truthy + with no block is expected to be falsey - with a predicate method + with a block argument is expected to be falsey - with a bang method - is expected to be truthy - #last_argument - with a single rest argument + #binary_operation?? + with an implicit call method + is expected to equal false + with a unary operation + is expected to equal false + with a binary operation is expected to equal true + 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 + #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 + #receiver + with a literal receiver is expected to equal true - with multiple regular arguments + with a variable receiver is expected to equal true - with a single keyword argument + with no receiver is expected to equal true - with a single regular argument + #nonmutating_unary_operator_method? + with a nonmutating unary operator method + is expected to be truthy + with a regular method + is expected to be falsey + #first_argument + 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 - -RuboCop::AST::KeywordSplatNode - #operator - is expected to eq "**" - #value - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #hash_rocket? - is expected to be falsey - #key - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - .new - is expected to equal true - #same_line? - when pairs are on separate lines + with a single literal argument + is expected to equal true + #prefix_not? + with a bang method is expected to be falsey - when both pairs are on the same line + with keyword `not` is expected to be truthy - when a multiline pair shares the same line + with a non-negated method + is expected to be falsey + #access_modifier? + when node is not an access modifier + is expected to be falsey + when node is a non-bare `private` + is expected to be truthy + when node is a bare `private` + is expected to be truthy + when node is a non-bare `public` + is expected to be truthy + 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 is a non-bare `protected` + is expected to be truthy + when node is a non-bare `module_function` + 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 + #unary_operation? + with an implicit call method + is expected to equal false + with a unary operation + is expected to equal true + with a binary operation + is expected to equal false + with a regular method call + is expected to equal false + #const_receiver? + with a self receiver + is expected to be falsey + with a non-constant receiver + is expected to be falsey + with a constant receiver 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 an operator method + is expected to be falsey + with a regular method + is expected to be falsey + #nonmutating_array_method? + with a mutating Array method + is expected to be falsey + with a regular method + is expected to be falsey + with a nonmutating Array method + is expected to be truthy + #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 implicit receiver + is expected to be truthy + with an explicit receiver + is expected to be falsey + #negation_method? + with prefix bang + is expected to be truthy + with suffix `not` + is expected to be falsey + with prefix `not` + is expected to be truthy + with a non-negated method + is expected to be falsey + #predicate_method? + with a regular method + is expected to be falsey + with a predicate method + is expected to be truthy + with a bang method + is expected to be falsey + #def_modifier? + with a prefixed def modifier + is expected to be truthy + with several prefixed def modifiers + is expected to be truthy + #lambda_literal? + with `a.() {}` style method + is expected to be falsey + with a stabby lambda + is expected to equal true + with a lambda method + is expected to equal false + with a non-lambda method + is expected to be falsey + +RuboCop::AST::KeywordSplatNode #key_delta with alignment set to :left when using colon delimiters + when keyword splat is 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 -2 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 using hash rocket 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 behind - 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 colon delimiters + when using hash rocket delimiters 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 keyword splat is ahead is expected to eq 0 - when using hash rocket delimiters - when keyword splat is ahead + when keyword splat is behind 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 aligned is expected to eq 0 - when keyword splat is on the same line + when keyword splat is ahead is expected to eq 0 + #hash_rocket? + is expected to be falsey + #same_line? + when pairs are on separate lines + is expected to be falsey + when both pairs are on the same line + is expected to be truthy + when a multiline pair shares the same line + is expected to be truthy + is expected to be truthy + #key + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + #operator + is expected to eq "**" #value_delta - when using hash rocket delimiters - when keyword splat is ahead + when using colon 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 behind + when keyword splat is ahead is expected to eq 0 - when using colon delimiters when keyword splat is on the same line 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 behind + 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 #colon? is expected to be falsey - -RuboCop::AST::HashNode - #empty? - with a hash containing pairs - is expected to equal false - with a hash containing a keyword splat - is expected to equal false - with an empty hash - is expected to equal true - #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 - with a hash with symbol keys - is expected to eq 3 - is expected to all be sym type - #pairs - 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 - with a hash of literals - is expected to all be pair type - is expected to eq 3 .new is expected to equal true - #braces? - with braces + #value + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + +RuboCop::AST::BlockNode + #lambda? + when block belongs to a method lambda is expected to be truthy - as an argument with no braces + when block belongs to a non-lambda method is expected to be falsey - as an argument with braces - is expected to be truthy - #each_key - when passed a block - yields all the pairs - when not passed a block - is expected to equal true - #each_value - when passed a block - yields all the pairs - when not passed a block - is expected to equal true - #pairs_on_same_line? - with some pairs on the same line + when block belongs to a stabby lambda is expected to be truthy - with no pairs on the same line + #void_context? + when block method is not each is expected to be falsey - with all pairs on the same line + when block method is tap is expected to be truthy - #mixed_delimiters? - 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 - when pairs are using different delimiters + when block method is each 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 - #values - with a hash with string keys - is expected to eq 2 - is expected to all be send type - with an empty hash - is expected to equal true - with a hash with literal values - is expected to all be literal - is expected to eq 3 - -RuboCop::AST::StrNode - .new - with a heredoc - is expected to equal true - with a string with interpolation - is expected to equal true - with a normal string - 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::CaseMatchNode - when using Ruby 2.7 or newer - #in_pattern_branches - is expected to eq 3 - is expected to all be in pattern type - #keyword - is expected to eq "case" - #else_branch - #else? - without an else statement - is expected to equal true - with 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 not passed a block - is expected to equal true - when passed a block - yields all the conditions - .new - is expected to equal true - -RuboCop::AST::BlockNode - #arguments? - with no arguments + #opening_delimiter + when enclosed in do-end keywords + is expected to eq "do" + when enclosed in braces + is expected to eq "{" + #keywords? + when enclosed in braces 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 a single argument - is expected to be truthy - with multiple mixed arguments + when enclosed in do-end keywords is expected to be truthy + #delimiters + when enclosed in braces + is expected to eq ["{", "}"] + when enclosed in do-end keywords + is expected to eq ["do", "end"] #arguments - with multiple mixed arguments - is expected to eq 2 with a single splat argument is expected to eq 1 with a single literal argument is expected to eq 1 + with multiple mixed arguments + is expected to eq 2 with no arguments is expected to equal true >= Ruby 2.7 using numbered parameters is expected to equal true - #void_context? - when block method is each - is expected to be truthy - when block method is not each - is expected to be falsey - when block method is tap - is expected to be truthy - #multiline? - when block is on several lines - is expected to be truthy - when block is on a single line - is expected to be falsey #single_line? when block is on a single line is expected to be truthy @@ -4302,85 +4368,90 @@ is expected to eq "}" when enclosed in do-end keywords is expected to eq "end" - #delimiters - when enclosed in do-end keywords - is expected to eq ["do", "end"] - when enclosed in braces - is expected to eq ["{", "}"] - #lambda? - when block belongs to a stabby lambda - is expected to be truthy - when block belongs to a non-lambda method + #multiline? + when block is on a single line is expected to be falsey - when block belongs to a method lambda + when block is on several lines is expected to be truthy .new is expected to equal true - #opening_delimiter - when enclosed in do-end keywords - is expected to eq "do" - when enclosed in braces - is expected to eq "{" #braces? when enclosed in braces is expected to be truthy when enclosed in do-end keywords is expected to be falsey - #keywords? - when enclosed in braces + #arguments? + with multiple mixed arguments + is expected to be truthy + >= Ruby 2.7 + using numbered parameters + is expected to equal false + with a single splat argument + is expected to be truthy + with no arguments is expected to be falsey - when enclosed in do-end keywords + with a single argument is expected to be truthy -RuboCop::AST::CaseNode +RuboCop::AST::AndNode + #alternate_operator + with a logical and node + is expected to eq "and" + with a semantic and node + is expected to eq "&&" + #lhs + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal true + #inverse_operator + with a semantic and node + is expected to eq "or" + with a logical and node + is expected to eq "||" + #rhs + with a logical and node + is expected to equal true + with a semantic 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" + #semantic_operator? + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal false .new - is expected to equal true - #else? - with an else statement - is expected to be truthy - without an else statement - is expected to be falsey - #else_branch - #else? - without an else statement - is expected to equal true - with an else statement - is expected to equal true - #branches - when compared to an IfNode - returns the same - 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 - #each_when - when passed a block - yields all the conditions - when not passed a block + with a logical and node is expected to equal true - #when_branches - is expected to all be when type - is expected to eq 3 - #keyword - is expected to eq "case" + with a semantic and node + is expected to equal true + #logical_operator? + with a logical and node + is expected to equal true + with a semantic and node + is expected to equal false -RuboCop::AST::FloatNode - #sign? - explicit negative float - is expected to be truthy - explicit positive float - is expected to be truthy - .new - is expected to be truthy - #value - is expected to eq 1.5 +RuboCop::AST::LambdaNode + #arguments + is expected to eq 2 + #receiver + is expected to eq nil + #method_name + is expected to eq :lambda + +RuboCop::AST::ForwardArgsNode + when using Ruby 2.7 or newer + #to_a + is expected to contain exactly (be forward arg type) -Finished in 3.61 seconds (files took 2.21 seconds to load) +Finished in 3.67 seconds (files took 2.26 seconds to load) 1401 examples, 0 failures -Randomized with seed 39563 +Randomized with seed 7270 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -4411,12 +4482,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/24359/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/24359/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/7009 and its subdirectories -I: Current time: Sun Aug 8 04:38:49 -12 2021 -I: pbuilder-time-stamp: 1628440729 +I: removing directory /srv/workspace/pbuilder/24359 and its subdirectories +I: Current time: Sun Sep 11 13:02:58 +14 2022 +I: pbuilder-time-stamp: 1662850978