Diff of the two buildlogs: -- --- b1/build.log 2022-01-11 17:02:33.994517246 +0000 +++ b2/build.log 2022-01-11 17:03:13.673281186 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Feb 13 11:22:07 -12 2023 -I: pbuilder-time-stamp: 1676330527 +I: Current time: Wed Jan 12 07:02:35 +14 2022 +I: pbuilder-time-stamp: 1641920555 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.5ztDGJFk/trustedkeys.kbx': General error -gpgv: Signature made Tue Aug 18 17:57:28 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.jgJaYMoe/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/1374284/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/3462034/tmp/hooks/D01_modify_environment starting +debug: Running on ionos11-amd64. +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/3462034/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/3462034/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='amd64' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=16' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='amd64' + 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]="x86_64-pc-linux-gnu") + BASH_VERSION='5.1.4(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=amd64 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=15' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - INVOCATION_ID='8ed94856586744ebb56eefbcfb92b318' - 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='1374284' - PS1='# ' - PS2='> ' + INVOCATION_ID=146caa1747b6439a96c483b338136a5d + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=3462034 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.Qm5qryOf9L/pbuilderrc_ld48 --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.Qm5qryOf9L/b1 --logfile b1/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' - SUDO_GID='111' - SUDO_UID='106' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://85.184.249.68: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.Qm5qryOf9L/pbuilderrc_jpIQ --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.Qm5qryOf9L/b2 --logfile b2/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' + SUDO_GID=111 + SUDO_UID=106 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://78.137.99.97:3128 I: uname -a - Linux ionos15-amd64 5.14.0-0.bpo.2-amd64 #1 SMP Debian 5.14.9-2~bpo11+1 (2021-10-10) x86_64 GNU/Linux + Linux i-capture-the-hostname 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux I: ls -l /bin total 5476 - -rwxr-xr-x 1 root root 1234376 Aug 4 2021 bash - -rwxr-xr-x 3 root root 38984 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 38984 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 38984 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 18424 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 43936 Sep 23 2020 cat - -rwxr-xr-x 1 root root 72672 Sep 23 2020 chgrp - -rwxr-xr-x 1 root root 64448 Sep 23 2020 chmod - -rwxr-xr-x 1 root root 72672 Sep 23 2020 chown - -rwxr-xr-x 1 root root 151168 Sep 23 2020 cp - -rwxr-xr-x 1 root root 125560 Dec 10 2020 dash - -rwxr-xr-x 1 root root 113664 Sep 23 2020 date - -rwxr-xr-x 1 root root 80968 Sep 23 2020 dd - -rwxr-xr-x 1 root root 93936 Sep 23 2020 df - -rwxr-xr-x 1 root root 147176 Sep 23 2020 dir - -rwxr-xr-x 1 root root 84440 Jul 28 2021 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 39712 Sep 23 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 39680 Sep 23 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 69032 Jul 28 2021 findmnt - -rwsr-xr-x 1 root root 34896 Feb 26 2021 fusermount - -rwxr-xr-x 1 root root 203072 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 2021 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 2021 gzexe - -rwxr-xr-x 1 root root 98048 Mar 2 2021 gzip - -rwxr-xr-x 1 root root 22600 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 72840 Sep 23 2020 ln - -rwxr-xr-x 1 root root 56952 Feb 7 2020 login - -rwxr-xr-x 1 root root 147176 Sep 23 2020 ls - -rwxr-xr-x 1 root root 149736 Jul 28 2021 lsblk - -rwxr-xr-x 1 root root 85184 Sep 23 2020 mkdir - -rwxr-xr-x 1 root root 76896 Sep 23 2020 mknod - -rwxr-xr-x 1 root root 48064 Sep 23 2020 mktemp - -rwxr-xr-x 1 root root 59632 Jul 28 2021 more - -rwsr-xr-x 1 root root 55528 Jul 28 2021 mount - -rwxr-xr-x 1 root root 18664 Jul 28 2021 mountpoint - -rwxr-xr-x 1 root root 147080 Sep 23 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 2021 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 43872 Sep 23 2020 pwd - lrwxrwxrwx 1 root root 4 Aug 4 2021 rbash -> bash - -rwxr-xr-x 1 root root 52032 Sep 23 2020 readlink - -rwxr-xr-x 1 root root 72704 Sep 23 2020 rm - -rwxr-xr-x 1 root root 52032 Sep 23 2020 rmdir - -rwxr-xr-x 1 root root 27472 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 122224 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Feb 9 03:47 sh -> dash - -rwxr-xr-x 1 root root 43808 Sep 23 2020 sleep - -rwxr-xr-x 1 root root 84928 Sep 23 2020 stty - -rwsr-xr-x 1 root root 71912 Jul 28 2021 su - -rwxr-xr-x 1 root root 39744 Sep 23 2020 sync - -rwxr-xr-x 1 root root 531928 Feb 16 2021 tar - -rwxr-xr-x 1 root root 14456 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 101408 Sep 23 2020 touch - -rwxr-xr-x 1 root root 39680 Sep 23 2020 true - -rwxr-xr-x 1 root root 14328 Feb 26 2021 ulockmgr_server - -rwsr-xr-x 1 root root 35040 Jul 28 2021 umount - -rwxr-xr-x 1 root root 39744 Sep 23 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 2021 uncompress - -rwxr-xr-x 1 root root 147176 Sep 23 2020 vdir - -rwxr-xr-x 1 root root 63744 Jul 28 2021 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 2021 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 2021 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 2021 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 2021 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 2021 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 2021 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 2021 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 2021 zless - -rwxr-xr-x 1 root root 1842 Mar 2 2021 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 2021 znew -I: user script /srv/workspace/pbuilder/1374284/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 1234376 Aug 5 10:25 bash + -rwxr-xr-x 3 root root 38984 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 38984 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 38984 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 18424 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 43936 Sep 24 2020 cat + -rwxr-xr-x 1 root root 72672 Sep 24 2020 chgrp + -rwxr-xr-x 1 root root 64448 Sep 24 2020 chmod + -rwxr-xr-x 1 root root 72672 Sep 24 2020 chown + -rwxr-xr-x 1 root root 151168 Sep 24 2020 cp + -rwxr-xr-x 1 root root 125560 Dec 11 2020 dash + -rwxr-xr-x 1 root root 113664 Sep 24 2020 date + -rwxr-xr-x 1 root root 80968 Sep 24 2020 dd + -rwxr-xr-x 1 root root 93936 Sep 24 2020 df + -rwxr-xr-x 1 root root 147176 Sep 24 2020 dir + -rwxr-xr-x 1 root root 84440 Jul 29 09:09 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 39712 Sep 24 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 39680 Sep 24 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 69032 Jul 29 09:09 findmnt + -rwsr-xr-x 1 root root 34896 Feb 27 2021 fusermount + -rwxr-xr-x 1 root root 203072 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 98048 Mar 3 2021 gzip + -rwxr-xr-x 1 root root 22600 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 72840 Sep 24 2020 ln + -rwxr-xr-x 1 root root 56952 Feb 8 2020 login + -rwxr-xr-x 1 root root 147176 Sep 24 2020 ls + -rwxr-xr-x 1 root root 149736 Jul 29 09:09 lsblk + -rwxr-xr-x 1 root root 85184 Sep 24 2020 mkdir + -rwxr-xr-x 1 root root 76896 Sep 24 2020 mknod + -rwxr-xr-x 1 root root 48064 Sep 24 2020 mktemp + -rwxr-xr-x 1 root root 59632 Jul 29 09:09 more + -rwsr-xr-x 1 root root 55528 Jul 29 09:09 mount + -rwxr-xr-x 1 root root 18664 Jul 29 09:09 mountpoint + -rwxr-xr-x 1 root root 147080 Sep 24 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 43872 Sep 24 2020 pwd + lrwxrwxrwx 1 root root 4 Aug 5 10:25 rbash -> bash + -rwxr-xr-x 1 root root 52032 Sep 24 2020 readlink + -rwxr-xr-x 1 root root 72704 Sep 24 2020 rm + -rwxr-xr-x 1 root root 52032 Sep 24 2020 rmdir + -rwxr-xr-x 1 root root 27472 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 122224 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Jan 12 07:02 sh -> bash + lrwxrwxrwx 1 root root 4 Jan 7 23:24 sh.distrib -> dash + -rwxr-xr-x 1 root root 43808 Sep 24 2020 sleep + -rwxr-xr-x 1 root root 84928 Sep 24 2020 stty + -rwsr-xr-x 1 root root 71912 Jul 29 09:09 su + -rwxr-xr-x 1 root root 39744 Sep 24 2020 sync + -rwxr-xr-x 1 root root 531928 Feb 17 2021 tar + -rwxr-xr-x 1 root root 14456 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 101408 Sep 24 2020 touch + -rwxr-xr-x 1 root root 39680 Sep 24 2020 true + -rwxr-xr-x 1 root root 14328 Feb 27 2021 ulockmgr_server + -rwsr-xr-x 1 root root 35040 Jul 29 09:09 umount + -rwxr-xr-x 1 root root 39744 Sep 24 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 2021 uncompress + -rwxr-xr-x 1 root root 147176 Sep 24 2020 vdir + -rwxr-xr-x 1 root root 63744 Jul 29 09:09 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/3462034/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 amd64 ruby-rspec-mocks all 3.9.0c2e2m1s3-2 [81.4 kB] Get: 132 http://deb.debian.org/debian bullseye/main amd64 ruby-rspec all 3.9.0c2e2m1s3-2 [8348 B] Get: 133 http://deb.debian.org/debian bullseye/main amd64 ruby-whitequark-parser all 2.7.1.4-2 [394 kB] -Fetched 44.6 MB in 2s (18.9 MB/s) +Fetched 44.6 MB in 1s (34.3 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 ... 19655 files and directories currently installed.) @@ -891,7 +925,8 @@ Building tag database... -> Finished parsing the build-deps 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: Name or service not known +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 +957,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/d20230213-1392777-7gqts8/gemspec +/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20220112-3476630-u2bz2/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 +967,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/d20230213-1392777-7gqts8/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/d20220112-3476630-u2bz2/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,2514 +1063,848 @@ 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 13879 +Randomized with seed 41341 -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 - -RuboCop::AST::DefNode - #void_context? - with a bracket assignment method - is expected to be truthy - with a comparison method - is expected to be falsey - with a regular assignment method - is expected to be truthy - with an initializer method - is expected to be truthy - with a regular method - is expected to be falsey - #operator_method? - with a regular method - is expected to be falsey - with a setter method - is expected to be falsey - with a unary operator method - is expected to be truthy - with a binary operator method - is expected to be truthy - #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 - #arguments? - with multiple mixed arguments - is expected to be truthy - with a single rest argument - 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 a single keyword argument - is expected to be truthy - with no arguments - is expected to be falsey - #body - with no body - 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 - #method? - when message does not match - when argument is a string - is expected to be falsey - when argument is a symbol - is expected to be falsey - when message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - #assignment_method? - with an assignment method - is expected to be truthy - with a regular method - is expected to be falsey - with a comparison method - is expected to be falsey - with a bracket assignment method - is expected to be truthy - #last_argument - 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 - is expected to equal true - with a single keyword argument - is expected to equal true - with a single regular argument - is expected to equal true - when using Ruby 2.7 or newer - #argument_forwarding? - is expected to be truthy - #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 multiple mixed arguments - is expected to eq 2 - with a single rest argument - is expected to eq 1 - with argument forwarding - is expected to eq 1 - with a single regular argument - is expected to eq 1 - with no arguments - is expected to equal true - with multiple regular arguments - is expected to eq 2 - #const_receiver? - with an instance method definition - is expected to be falsey - with a singleton method definition - is expected to be truthy - with a class method definition - is expected to be falsey - #method_name - 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 :-@ - with a setter method - is expected to eq :foo= - #receiver - with a class method definition - is expected to equal true - with an instance method definition - is expected to equal true - with a singleton method definition - is expected to equal true - #block_argument? - with regular arguments - is expected to be falsey - with a block argument - is expected to be truthy - with no arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - #rest_argument? - with mixed arguments - is expected to be truthy - with regular arguments - is expected to be falsey - with a rest argument - is expected to be truthy - with no arguments - is expected to be falsey - #comparison_method? - with a comparison method - is expected to be truthy - with a regular method - is expected to be falsey - #camel_case_method? - with a regular method - is expected to be falsey - with a camel case method - is expected to be truthy - #first_argument - with multiple mixed arguments +RuboCop::AST::AndNode + #inverse_operator + with a logical and node + is expected to eq "||" + with a semantic and node + is expected to eq "or" + #lhs + with a semantic and node is expected to equal true - with no arguments + with a logical and node is expected to equal true - with multiple regular arguments + #logical_operator? + with a logical and node is expected to equal true - with a single rest argument + with a semantic and node + is expected to equal false + #rhs + with a logical and node is expected to equal true - with a single regular argument + with a semantic and node is expected to equal true - with a single keyword argument + #semantic_operator? + with a logical and node + is expected to equal false + with a semantic and 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 + #alternate_operator + with a semantic and node + is expected to eq "&&" + with a logical and node + is expected to eq "and" + #operator + with a logical and node + is expected to eq "&&" + with a semantic and node + is expected to eq "and" .new - with a def node + with a semantic and node is expected to equal true - with a defs node + with a logical and node is expected to equal true +RuboCop::AST::Token + #to_s + returns string of token data + #space_before + returns nil when there is not a space before token + returns nil when it is on the first line + returns truthy MatchData when there is a space before token + #space_after + returns nil when there is not a space after token + returns truthy MatchData when there is a space after token + #column + returns index of first char in token range on that line + #begin_pos + returns index of first char in token range of entire source + #end_pos + returns index of last char in token range of entire source + type predicates + #equals_sign? + returns false for non equals sign tokens + returns true for equals sign tokens + #semicolon? + returns false for non semicolon tokens + returns true for semicolon tokens + #left_bracket? + returns true for all left_bracket tokens + returns false for non left_bracket tokens + #left_array_bracket? + returns false for non left_array_bracket tokens + returns true for left_array_bracket tokens + with braces & parens + #left_brace? + returns true for left hash brace tokens + returns false for non left hash brace tokens + #left_parens? + returns false for non left parens tokens + returns true for left parens tokens + #right_parens? + returns false for non right parens tokens + returns true for right parens tokens + #left_curly_brace? + returns true for left block brace tokens + returns false for non left block brace tokens + #right_curly_brace? + returns false for non right brace tokens + returns true for all right brace tokens + #right_bracket? + returns false for non right_bracket tokens + returns true for all right_bracket tokens + #comment? + returns true for comment tokens + returns false for non comment tokens + #rescue_modifier? + returns true for rescue modifier tokens + returns false for non rescue modifier tokens + #left_ref_bracket? + returns true for left_ref_bracket tokens + returns false for non left_ref_bracket tokens + #comma? + returns true for comma tokens + returns false for non comma tokens + #end? + returns false for non end tokens + returns true for end tokens + #left_brace? + returns false for non right_bracket tokens + returns true for right_bracket tokens + #line + returns line of token + .from_parser_token + sets parser token's range to rubocop token's pos + returns a #to_s useful for debugging + sets parser token's text to rubocop token's text + sets parser token's type to rubocop token's type + RuboCop::AST::EnsureNode .new is expected to equal true #body is expected to equal true -RuboCop::AST::RegexpNode - #delimiter? - with multi-line %r{-delimiters - is expected to eq false - is expected to eq true - is expected to eq false - is expected to eq false - is expected to eq true - is expected to eq false - is expected to eq false - is expected to eq false - with %r/-delimiters - is expected to eq false - is expected to eq false - is expected to eq false - is expected to eq true - is expected to eq false - is expected to eq false - is expected to eq false - with %r{-delimiters - is expected to eq 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 - 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 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 - with /-delimiters - is expected to eq true - is expected to eq 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 /-delimiters - is expected to eq ["/", "/"] - with %r{-delimiters - is expected to eq ["{", "}"] - #percent_r_literal? - 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 - with /-delimiters - is expected to eq false - with %r<-delimiters - is expected to eq true - #regopt - with a regexp without option - is expected to equal true - is expected to equal true - with a multi-line 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 a regexp with option - is expected to eq [:i, :m, :x] - is expected to equal true - with a multi-line regexp with option - is expected to eq [:i, :m, :x] - is expected to equal true - with an empty regexp - is expected to equal true - is expected to equal true - #ignore_case? - with other options - is expected to equal false - with no options - is expected to equal false - with only i option - is expected to equal true - with i and other options - is expected to equal true - .new - is expected to equal true - #slash_literal? - with multi-line %r{-delimiters - is expected to eq false - with %r<-delimiters - is expected to eq false - with %r/-delimiters - is expected to eq false - with /-delimiters - is expected to eq true - with %r{-delimiters - is expected to eq false - #single_interpolation? - with other options - is expected to equal false - with no options +RuboCop::AST::StrNode + #heredoc? + with a normal string is expected to equal false - with o and other options - is expected to equal true - with only o option - is expected to equal true - #extended? - with x and other options - is expected to equal true - with only x option + with a heredoc is expected to equal true - with no options - is expected to equal false - with other options - is expected to equal false - #multiline_mode? - with other options + with a string with interpolation is expected to equal false - with only m option - is expected to equal true - with m and other options + .new + with a normal string is expected to equal true - with no options - is expected to equal false - #no_encoding? - with only n option + with a heredoc is expected to equal true - with other options - is expected to equal false - with no options - is expected to equal false - with n and other options + with a string with interpolation is expected to equal true - #content - with a regexp without option - is expected to eq ".+" - with a multi-line regexp without option - is expected to eq "\n.+\n" - with an empty regexp with option - is expected to eq "" - with a regexp with option - is expected to eq ".+" - with an empty regexp - is expected to eq "" - with a multi-line regexp with option - is expected to eq "\n.+\n" - #to_regexp - with a regexp without option - is expected to eq /.+/ - with a regexp with an "o" option - is expected to eq "/abc/i" - with a multi-line regexp with option - is expected to eq / -.+ -/ix - with an empty regexp with option - is expected to eq //ix - with a regexp with option - is expected to eq /.+/mix - with a multi-line regexp without option - is expected to eq / -.+ -/ - with an empty regexp - is expected to eq // - #interpolation? - with no interpolation returns false - is expected to eq false - with direct variable interpoation - is expected to eq true - with regexp quote - is expected to eq true - -RuboCop::AST::ProcessedSource - valid_syntax? - when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI - returns true - 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 - when the source is completely valid - returns true - when the source is invalid - returns false - when a line starts with an integer literal - tokenizes the source correctly - #buffer - is a source buffer - #file_path - returns file path - #path - is the path passed to .new - #blank? - with source with content - returns false - with source of no content - returns true - #comments - is an array of comments - when the source is invalid - returns [] - #lines - contains lines as string without linefeed - is an array - has same number of elements as line count - #tokens - has an array of tokens - #ast - is the root node of AST - token enumerables - #find_token - yields nil when there is no match - yields correct token - #each_token - yields all tokens - #parser_error - when the source was properly parsed - is nil - when the source could not be parsed due to encoding error - returns the error - when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII - is nil - #preceding_line - returns source of line before token - #following_line - returns source of line after token - #[] - 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 - with heavily commented source - #each_comment - yields all comments - #each_comment_in_lines - yields the comments - #line_with_comment? - returns true for lines with comments - returns false for lines without comments - #find_comment - yields correct comment - yields nil when there is no match - #comment_at_line - returns nil if line has no comment - returns the comment at the given line number - #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 source_range on comment line - is expected to equal true - provided a multiline source_range with at least one line with comment - is expected to equal true - provided source_range on line without comment - is expected to equal false - .from_file - raises a Errno::ENOENT when the file does not exist - when the file exists - returns an instance of ProcessedSource - sets the file path to the instance's #path - #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::KeywordSplatNode - #same_line? - 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 - when pairs are on separate lines - is expected to be falsey - #colon? - is expected to be falsey - .new - is expected to equal true - #value_delta - when using hash rocket delimiters - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is behind - is expected to eq 0 - when keyword splat is left aligned - is expected to eq 0 - 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 keyword splat is left aligned - 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 - #value - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #key_delta - with alignment set to :right - when using colon delimiters - when keyword splat is ahead - is expected to eq 0 - when keyword splat is behind - is expected to eq 0 - when keyword splat is aligned - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when using hash rocket 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 ahead - is expected to eq 0 - when keyword splat is behind - is expected to eq 0 - with alignment set to :left - when using colon delimiters - 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 - 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 ahead - is expected to eq 2 - when keyword splat is behind - is expected to eq -2 - #key - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #hash_rocket? - is expected to be falsey - #operator - is expected to eq "**" -RuboCop::AST::SymbolNode +RuboCop::AST::DefinedNode + #arguments + is expected to all be sym type + is expected to eq 1 .new - with a symbol node + with a defined? node is expected to equal true - #value - is expected to eq :foo - -RuboCop::AST::BreakNode - behaves like wrapped arguments node - .new - without arguments - is expected to equal true - with arguments - is expected to equal true - #arguments - with no arguments - is expected to equal true - with no arguments and braces - is expected to equal true - with a single argument and braces - is expected to eq 1 - with a single argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with a single splat argument - is expected to eq 1 + #receiver + is expected to eq nil + #method_name + is expected to eq :defined? RuboCop::AST::BlockNode - #void_context? - when block method is each - is expected to be truthy - when block method is tap - is expected to be truthy - when block method is not each - is expected to be falsey - #lambda? - when block belongs to a non-lambda method - is expected to be falsey - when block belongs to a method lambda - is expected to be truthy - when block belongs to a stabby lambda - is expected to be truthy - #multiline? - when block is on a single line - is expected to be falsey - when block is on several lines - is expected to be truthy - #delimiters + #keywords? when enclosed in braces - is expected to eq ["{", "}"] - when enclosed in do-end keywords - is expected to eq ["do", "end"] - #closing_delimiter + is expected to be falsey when enclosed in do-end keywords - is expected to eq "end" - when enclosed in braces - is expected to eq "}" - #single_line? - when block is on a single line is expected to be truthy - when block is on several lines - is expected to be falsey - #opening_delimiter + #braces? when enclosed in braces - is expected to eq "{" + is expected to be truthy when enclosed in do-end keywords - is expected to eq "do" + is expected to be falsey #arguments? - with a single argument + with multiple mixed arguments is expected to be truthy - with no arguments - is expected to be falsey with a single splat argument is expected to be truthy + with no arguments + is expected to be falsey >= Ruby 2.7 using numbered parameters is expected to equal false - with multiple mixed arguments + with a single argument is expected to be truthy - #keywords? + #closing_delimiter when enclosed in braces - is expected to be falsey + is expected to eq "}" when enclosed in do-end keywords - is expected to be truthy + is expected to eq "end" .new is expected to equal true - #arguments - with no arguments - is expected to equal true - with a single literal argument - is expected to eq 1 - with multiple mixed arguments - is expected to eq 2 - >= Ruby 2.7 - using numbered parameters - is expected to equal true - with a single splat argument - is expected to eq 1 - #braces? - when enclosed in braces - is expected to be truthy + #opening_delimiter when enclosed in do-end keywords - is expected to be falsey - -RuboCop::AST::ClassNode - .new - 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 - #identifier - is expected to equal true - #body - with an empty body - is expected to equal nil - with a multi-expression body - is expected to equal true - with a single expression body - is expected to equal true - -RuboCop::AST::IfNode - #if? - with an if statement - is expected to be truthy - with an unless statement - is expected to be falsey - with a ternary operator - is expected to be falsey - #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" - #each_branch - when passed a block - yields all the branches - when not passed a block - is expected to equal true - #unless? - with a ternary operator - is expected to be falsey - with an unless statement - is expected to be truthy - with an if statement - is expected to be falsey - #else_branch - with an unless statement - is expected to equal true - with a ternary operator - is expected to equal true - with an if statement - is expected to equal true - #else? - with an elsif statement - is expected to be truthy - without an else 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 - #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 non-modifier unless statement - is expected to be falsey - with a ternary operator - is expected to be falsey - with a modifier if statement - is expected to be truthy - #if_branch - with a ternary operator - is expected to equal true - with an if statement - is expected to equal true - with an unless statement - is expected to equal true - #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 if clause - is expected to be truthy - with nested conditionals in elsif clause + is expected to eq "do" + when enclosed in braces + is expected to eq "{" + #void_context? + when block method is tap is expected to be truthy - #elsif? - without an elsif statement - is expected to be falsey - with an elsif statement + when block method is each is expected to be truthy - with an if statement comtaining an elsif - is expected to be falsey - .new - with a modifier statement - is expected to equal true - with a ternary operator - is expected to equal true - with a regular if statement - is expected to equal true - #inverse_keyword? - with an unless statement - is expected to eq "if" - with a ternary operator - is expected to eq "" - with an if statement - is expected to eq "unless" - #branches - with an unless statement - is expected to eq 1 - is expected to all be literal - with an elsif statement - is expected to all be literal - is expected to eq 3 - with an else statement - is expected to eq 2 - is expected to all be literal - with an if statement - is expected to all be literal - is expected to eq 1 - #elsif_conditional? - with nested conditionals in if clause + when block method is not each 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 - with multiple elsif conditionals - is expected to be truthy - with one elsif conditional + #multiline? + when block is on several lines is expected to be truthy - with nested conditionals in else clause + when block is on a single line is expected to be falsey - -RuboCop::AST::SuperNode - #macro? - is expected to be falsey - #parenthesized? - with no arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - #implicit_call? - is expected to be falsey #arguments - with a single splat argument - is expected to eq 1 with no arguments is expected to equal true with a single literal argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 - with multiple literal arguments - is expected to eq 2 - #double_colon? - is expected to be falsey - #predicate_method? - is expected to be falsey - #block_argument? - with regular arguments - is expected to be falsey - with a block argument - is expected to be truthy - with mixed arguments - is expected to be truthy - with no arguments - is expected to be falsey - #splat_argument? - with regular arguments - is expected to be falsey - 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 - #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 - #dot? - is expected to be falsey - #operator_method? - is expected to be falsey - #setter_method? - is expected to be falsey - #block_node - with a block argument - is expected to equal true - with a block literal - is expected to equal true - with no block - is expected to equal true - .new - with a zsuper node - is expected to equal true - with a super node - is expected to equal true - #camel_case_method? - is expected to be falsey - #bang_method? - is expected to be falsey - #last_argument - 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 with a single splat argument - is expected to equal true - #receiver - is expected to equal true - #assignment_method? - is expected to be falsey - #const_receiver? - is expected to be falsey - #first_argument - with a single splat 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 - with a single literal argument - is expected to equal true - #arguments? - with no arguments + is expected to eq 1 + >= Ruby 2.7 + using numbered parameters + is expected to equal true + #lambda? + when block belongs to a non-lambda method is expected to be falsey - with a single splat argument - is expected to be truthy - with a single literal argument + when block belongs to a method lambda is expected to be truthy - with multiple mixed arguments + when block belongs to a stabby lambda is expected to be truthy - with multiple literal arguments + #delimiters + when enclosed in do-end keywords + is expected to eq ["do", "end"] + when enclosed in braces + is expected to eq ["{", "}"] + #single_line? + when block is on several lines + is expected to be falsey + when block is on a single line is expected to be truthy - #command? - when argument is a string + +RuboCop::AST::UntilNode + #loop_keyword? + with a modifier until is expected to be truthy - when argument is a symbol + with a statement until is expected to be truthy - #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 string - is expected to be falsey - when argument is a symbol - is expected to be falsey - #method_name - is expected to eq :super - #comparison_method? - is expected to be falsey - #self_receiver? - is expected to be falsey - -RuboCop::AST::ModuleNode .new - is expected to equal true - #identifier - is expected to equal true - #body - with a multi-expression body + with a modifier until is expected to equal true - with a single expression body + with a statement until is expected to equal true - with an empty body - is expected to equal nil - -RuboCop::AST::LambdaNode - #receiver - is expected to eq nil - #method_name - is expected to eq :lambda - #arguments - is expected to eq 2 - -RuboCop::AST::ForNode - #void_context? - without a do keyword - is expected to be truthy - with a do keyword - is expected to be truthy - #body - is expected to equal true - #variable - is expected to equal true - #post_condition_loop? - is expected to be falsey - #loop_keyword? - is expected to be truthy + #inverse_keyword + is expected to eq "while" #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey - .new - is expected to equal true - #collection - is expected to equal true #keyword - is expected to eq "for" - -RuboCop::AST::SelfClassNode - .new - is expected to equal true - #body - with a single expression body - is expected to equal true - with an empty body - is expected to equal nil - with a multi-expression body - is expected to equal true - #identifier - is expected to equal true - -RuboCop::AST::IntNode - #sign? - explicit positive int - is expected to be truthy - explicit negative int - is expected to be truthy - #value - is expected to eq 10 - .new - is expected to be truthy - -RuboCop::AST::PairNode - #key_delta - with alignment set to :right - when using hash rocket delimiters - when receiver key is behind - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq -2 - when 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 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 both pairs are explicit pairs - is expected to eq 0 - when second pair is a keyword splat - is expected to eq 0 - when using colon delimiters - when keys are aligned - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is ahead - when both pairs are explicit pairs - is expected to eq 2 - when second pair is a keyword splat - is expected to eq 0 - when both keys are on the same line - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is behind - when second pair is a keyword splat - is expected to eq 0 - when both pairs are reail pairs - is expected to eq -2 - with alignment set to :left - 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 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 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 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 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 both pairs are reail 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 second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver key is ahead - when second pair is a keyword splat - is expected to eq 2 - when both pairs are explicit pairs - is expected to eq 2 - #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 - #colon? - when using a colon delimiter - is expected to be truthy - when using a hash rocket delimiter - is expected to be falsey - .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 ahead - is expected to eq 2 - when values are aligned - when second pair is a keyword splat - is expected to eq 0 - when both pairs are explicit pairs - is expected to eq 0 - when receiver value is behind - is expected to eq -2 - when using hash rocket delimiters - when receiver value is ahead - is expected to eq 2 - when values are aligned - when both pairs are explicit pairs - is expected to eq 0 - when second pair is a keyword splat - is expected to eq 0 - when both pairs are on the same line - is expected to eq 0 - when receiver value is behind - is expected to eq -2 - #value_on_new_line? - when value starts on a new line - is expected to be truthy - when pair is on a single line - is expected to be falsey - when value spans multiple lines + is expected to eq "until" + #post_condition_loop? + with a statement until is expected to be falsey - #key - when using a symbol key - is expected to equal true - when using a string key - is expected to equal true - #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 ":" - #inverse_delimiter - when using a hash rocket delimiter - is expected to eq ": " - is expected to eq ":" - when using a colon delimiter - is expected to eq " => " - is expected to eq "=>" - -RuboCop::AST::Token - #column - returns index of first char in token range on that line - #to_s - returns string of token data - .from_parser_token - sets parser token's range to rubocop token's pos - 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 - type predicates - #semicolon? - returns false for non semicolon tokens - returns true for semicolon tokens - #left_ref_bracket? - returns false for non left_ref_bracket tokens - returns true for left_ref_bracket tokens - #left_array_bracket? - returns true for left_array_bracket tokens - returns false for non left_array_bracket tokens - #equals_sign? - returns true for equals sign tokens - returns false for non equals sign tokens - #end? - returns true for end tokens - returns false for non end tokens - #comment? - returns true for comment tokens - returns false for non comment tokens - #comma? - returns true for comma tokens - returns false for non comma tokens - #right_bracket? - returns false for non right_bracket tokens - returns true for all right_bracket tokens - with braces & parens - #right_parens? - returns false for non right parens tokens - returns true for right parens tokens - #left_curly_brace? - returns false for non left block brace tokens - returns true for left block brace tokens - #left_parens? - returns false for non left parens tokens - returns true for left parens tokens - #right_curly_brace? - returns false for non right brace tokens - returns true for all right brace tokens - #left_brace? - returns true for left hash brace tokens - returns false for non left hash brace tokens - #left_bracket? - returns false for non left_bracket tokens - returns true for all left_bracket tokens - #rescue_modifier? - returns false for non rescue modifier tokens - returns true for rescue modifier tokens - #left_brace? - returns false for non right_bracket tokens - returns true for right_bracket tokens - #line - returns line of token - #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 - #begin_pos - returns index of first char in token range of entire source - #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 - -RuboCop::AST::CaseNode - #else? - with an else statement + with a modifier until is expected to be truthy - without an else statement - is expected to be falsey - #when_branches - is expected to all be when type - is expected to eq 3 - #else_branch - #else? - without an else statement - is expected to equal true - with an else statement - is expected to equal true - #branches - when there is no else keyword - returns only then when bodies - 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 - .new - is expected to equal true - #each_when - when not passed a block - is expected to equal true - when passed a block - yields all the conditions - #keyword - is expected to eq "case" RuboCop::AST::HashNode - #empty? - with an empty hash - is expected to equal true - with a hash containing pairs - is expected to equal false - with a hash containing a keyword splat - is expected to equal false - #braces? - as an argument with no braces - is expected to be falsey - as an argument with braces - is expected to be truthy - with braces - is expected to be truthy - #mixed_delimiters? - 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 - when all pairs are using a colon delimiter - is expected to be falsey - #pairs_on_same_line? - with some pairs on the same line - is expected to be truthy - with no pairs on the same line - is expected to be falsey - with all pairs on the same line - is expected to be truthy - #values - with an empty hash - is expected to equal true - with a hash with string keys - is expected to all be send type - is expected to eq 2 - with a hash with literal values - is expected to eq 3 - is expected to all be literal - #each_key - when not passed a block - is expected to equal true - when passed a block - yields all the pairs - .new - is expected to equal true #pairs - with an empty hash - is expected to equal true - with a hash of literals - is expected to eq 3 - is expected to all be pair type with a hash of variables is expected to eq 2 is expected to all be pair type + with a hash of literals + is expected to all be pair type + is expected to eq 3 + with an empty hash + is expected to equal true #keys with an empty hash is expected to equal true with a hash with symbol keys - is expected to all be sym type is expected to eq 3 + is expected to all be sym type with a hash with string keys is expected to all be str type is expected to eq 2 - #each_pair + .new + is expected to equal true + #each_value when not passed a block is expected to equal true when passed a block yields all the pairs - #each_value - when not passed a block - is expected to equal true + #each_key when passed a block yields all the pairs - -RuboCop::AST::UntilNode - #keyword - is expected to eq "until" - #post_condition_loop? - with a modifier until - is expected to be truthy - with a statement until - is expected to be falsey - #loop_keyword? - with a statement until - is expected to be truthy - with a modifier until - is expected to be truthy - #inverse_keyword - is expected to eq "while" - .new - with a modifier until - is expected to equal true - with a statement until + when not passed a block is expected to equal true - #do? - with a do keyword + #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 - without a do keyword + when all pairs are using a hash rocket delimiter is expected to be falsey - -RuboCop::AST::Node - #value_used? - within a singleton class node - is always true - at the end of a block - is always true - within a while node - is true only for the condition - within an if...else..end node - at the top level - is true only for the condition - nested in a method call - is always true - at the top level - is false - within a method call node - is always true - within a class definition node - is always true - within a module definition node - is always true - within an array literal - at the top level - is always false - assigned to an ivar - is always true - #recursive_basic_literal? - behaves like literal - returns true for `!true` - behaves like non literal - returns false for `some_method_call(x, y)` - behaves like non literal - returns false for `(x && false)` - behaves like literal - returns true for `1.0` - behaves like non literal - returns false for `/.#{some_method_call}/` - behaves like non literal - returns false for `%r{abx#{foo}}ixo` - behaves like non literal - returns false for `(x == false)` - behaves like literal - returns true for `"#{2}"` - behaves like literal - returns true for `nil` - behaves like non literal - returns false for `(x or false)` - behaves like literal - returns true for `%r{abx}ixo` - behaves like literal - returns true for `false` - behaves like literal - returns true for `1` - behaves like literal - returns true for `(false <=> true)` - behaves like literal - returns true for `(false && true)` - behaves like literal - returns true for `(1)` - behaves like non literal - returns false for `some_method_call` - behaves like non literal - returns false for `[some_method_call]` - behaves like literal - returns true for `/./` - behaves like literal - returns true for `'str'` - behaves like literal - returns true for `{ a: 1, b: 2 }` - behaves like literal - returns true for `{ :a => 1, :b => 2 }` - behaves like non literal - returns false for `{ :sym => some_method_call }` - behaves like literal - returns true for `(false or true)` - behaves like non literal - returns false for `{ some_method_call => :sym }` - behaves like literal - returns true for `[1, 2, 3]` - #module_definition? - nested modules - matches - prepend Module.new - matches - with ::ModuleName - matches - using module keyword - matches - included module definition - matches - with Module.new - matches - namespaced modules - matches - #struct_constructor? - struct definition without block - does not match - ::Struct - matches - struct definition with a block - matches - #pure? - for a class definition - returns false - for a cvar assignment - returns false - for an ivar assignment - returns false - for an integer literal - returns true - for a regexp - with options - returns true - with no interpolation - returns true - with interpolated segments - returns false - for a module definition - returns false - for an array literal - with only literal children - returns true - which contains a method call - returns false - for a nested if - where one branch contains a method call - returns false - where one branch contains an assignment statement - returns false - where the innermost descendants are local vars and literals - returns true - for a hash literal - with only literal children - returns true - which contains a method call - returns false - for a gvar assignment - returns false - for an lvar assignment - returns false - for a method call - returns false - #class_constructor? - module definition with a block - matches - class definition on outer scope - matches - class definition with a block - matches - class definition - does not match - #class_definition? - with Struct - matches - with object singleton class - matches - with Class.new - matches - with ::ClassName - matches - namespaced class - matches - with inheritance - matches - constant defined as Struct without block - does not match - with self singleton class - matches - without inheritance - matches - #sibling_index - returns its sibling index - #argument_type? - method arguments - returns true for all argument types - block arguments - returns true for all argument types - -RuboCop::AST::DefinedNode - #receiver - is expected to eq nil - .new - with a defined? node + #each_pair + when not passed a block is expected to equal true - #arguments - is expected to eq 1 - is expected to all be sym type - #method_name - is expected to eq :defined? - -RuboCop::AST::ReturnNode - 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 - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with a single argument - is expected to eq 1 - with a single argument and braces - is expected to eq 1 - with no arguments - is expected to equal true - with no arguments and braces - is expected to equal true - -RuboCop::AST::WhileNode - #keyword - is expected to eq "while" - #do? - with a do keyword + when passed a block + yields all the pairs + #pairs_on_same_line? + with all pairs on the same line is expected to be truthy - without a do keyword - is expected to be falsey - #loop_keyword? - with a statement while + with some pairs on the same line is expected to be truthy - with a modifier while + with no pairs on the same line + is expected to be falsey + #braces? + as an argument with no braces + is expected to be falsey + with braces is expected to be truthy - .new - with a statement while - is expected to equal true - with a modifier while - is expected to equal true - #post_condition_loop? - with a modifier while + as an argument with braces is expected to be truthy - with a statement while - is expected to be falsey - #inverse_keyword - is expected to eq "until" - -RuboCop::AST::NextNode - behaves like wrapped arguments node - .new - with arguments - is expected to equal true - without arguments - is expected to equal true - #arguments - with a single argument - is expected to eq 1 - with no arguments - is expected to equal true - 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 a single splat argument - is expected to eq 1 - -RuboCop::AST::AndNode - #logical_operator? - with a logical and node + #values + with a hash with literal values + is expected to eq 3 + is expected to all be literal + with a hash with string keys + is expected to all be send type + is expected to eq 2 + with an empty hash is expected to equal true - with a semantic and node + #empty? + with a hash containing pairs is expected to equal false - #lhs - with a logical and node - is expected to equal true - with a semantic and node - is expected to equal true - #alternate_operator - with a logical and node - is expected to eq "and" - with a semantic and node - is expected to eq "&&" - #operator - with a semantic and node - is expected to eq "and" - with a logical and node - is expected to eq "&&" - #semantic_operator? - with a semantic and node - is expected to equal true - with a logical and node + with a hash containing a keyword splat is expected to equal false - #rhs - with a logical and node - is expected to equal true - with a semantic and node - is expected to equal true - .new - with a logical and node - is expected to equal true - with a semantic and node + with an empty hash is expected to equal true - #inverse_operator - with a logical and node - is expected to eq "||" - with a semantic and node - is expected to eq "or" - -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 RuboCop::AST::SendNode - #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 + #dot? + without a dot is expected to be falsey - #splat_argument? - with mixed arguments - is expected to be truthy - with a splat argument + with a dot is expected to be truthy - with regular arguments + with a double colon is expected to be falsey - with no arguments + with a unary method is expected to be falsey - #operator_method? + #camel_case_method? + with a camel case method + is expected to be truthy with a regular method is expected to be falsey - with a setter method + #const_receiver? + with a non-constant receiver is expected to be falsey - with a unary operator method - is expected to be truthy - with a binary operator method + with a constant receiver 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 message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - #method_name - with a setter method - is expected to eq :bar= - 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 :== - #last_argument - with no arguments - is expected to equal true - with a single literal argument - is expected to equal true - with a single splat argument + with a self receiver + is expected to be falsey + #block_node + with no block is expected to equal true - with multiple mixed arguments + with a block literal is expected to equal true - with multiple literal arguments + with a block argument is expected to equal true #command? - when argument is a symbol - with an explicit receiver - is expected to be falsey + when argument is a string with an implicit receiver is expected to be truthy - when argument is a string + with an explicit receiver + is expected to be falsey + when argument is a symbol with an explicit receiver is expected to be falsey with an implicit receiver is expected to be truthy - #nonmutating_hash_method? - with a mutating Hash method - is expected to be falsey - with a nonmutating Hash method - is expected to be truthy - with a regular method + #unary_operation? + with a binary operation + is expected to equal false + with an implicit call method + is expected to equal false + with a unary operation + is expected to equal true + with a regular method call + is expected to equal false + #splat_argument? + with no arguments is expected to be falsey - #bare_access_modifier? - when node is a bare `protected` + with a splat argument is expected to be truthy - when node is a bare `module_function` + with mixed arguments is expected to be truthy - when node is a bare `private` + with regular arguments + is expected to be falsey + #block_argument? + with mixed arguments is expected to be truthy - when node is a bare `public` + with a block argument is expected to be truthy - when node has an argument + with no arguments is expected to be falsey - when node is not an access modifier + with regular arguments is expected to be falsey - .new - with a regular method send - is expected to equal true - with a safe navigation method send - is expected to equal true #arguments? - with multiple mixed arguments - is expected to be truthy - with multiple literal arguments - is expected to be truthy - with a single splat argument - is expected to be truthy with no arguments is expected to be falsey - with a single literal argument + with a single splat argument is expected to be truthy - #prefix_not? - with keyword `not` + with multiple mixed arguments is expected to be truthy - with a bang method - is expected to be falsey - with a non-negated method - is expected to be falsey - #comparison_method? - with a negation method - is expected to be falsey - with a comparison method + with multiple literal arguments is expected to be truthy - with a regular method - is expected to be falsey - #binary_operation?? - with an implicit call method - is expected to equal false - with a unary operation - is expected to equal false - with a regular method call - is expected to equal false - with a binary operation - is expected to equal true - #nonmutating_unary_operator_method? - with a nonmutating unary operator method + with a single literal argument is expected to be truthy - with a regular method - is expected to be falsey - #nonmutating_array_method? - with a regular method - is expected to be falsey - with a nonmutating Array method + #access_modifier? + when node is a non-bare `module_function` is expected to be truthy - with a mutating Array method - is expected to be falsey - #implicit_call? - with an explicit call method - is expected to be falsey - with an implicit call method + when node is a bare `public` is expected to be truthy - with a regular method - is expected to be falsey - #receiver - with a literal receiver - is expected to equal true - with a variable receiver - is expected to equal true - with no receiver - is expected to equal true - #parenthesized? - with no arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with arguments - when using parentheses - is expected to be truthy - when not using parentheses - is expected to be falsey - #nonmutating_operator_method? - with a nonmutating unary operator method + when node is a non-bare `protected` is expected to be truthy - with a regular method - is expected to be falsey - with a mutating binary operator method - is expected to be falsey - with a nonmutating binary operator method + when node is a bare `module_function` is expected to be truthy - #bang_method? - with a regular method - is expected to be falsey - with a predicate method - is expected to be falsey - with a bang method + when node is a bare `protected` is expected to be truthy - #enumerable_method? - with a regular method + when node is not an access modifier is expected to be falsey - with an enumerable method - is expected to be truthy - #nonmutating_string_method? - with a nonmutating String method + when node is a bare `private` is expected to be truthy - with a mutating String method - is expected to be falsey - with a regular method - is expected to be falsey - #access_modifier? when node is a non-bare `public` is expected to be truthy - when node is a bare `private` + when node is a non-bare `private` is expected to be truthy - when node is a bare `module_function` + #bare_access_modifier? + when node is a bare `protected` is expected to be truthy - when node is a non-bare `module_function` + 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 a non-bare `private` + when node is a bare `module_function` is expected to be truthy - when node is a non-bare `protected` + when node has an argument + is expected to be falsey + when node is not an access modifier + is expected to be falsey + #implicit_call? + with an implicit call method is expected to be truthy - when node is a bare `protected` + with a regular method + is expected to be falsey + with an explicit call method + 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 + #nonmutating_binary_operator_method? + with a nonmutating binary operator method is expected to be truthy - when node is not an access modifier + with a mutating binary operator method is expected to be falsey - #loop_keyword? - is expected to equal false - #post_condition_loop? - is expected to equal false - #prefix_bang? - with keyword `not` + with a regular method is expected to be falsey + #prefix_bang? with a non-negated method is expected to be falsey with a bang method is expected to be truthy - #double_colon? - without a dot - is expected to be falsey - with a dot + with keyword `not` is expected to be falsey + #double_colon? with a unary method is expected to be falsey - with a double colon - is expected to be truthy - #block_node - with no block - is expected to equal true - with a block argument - is expected to equal true - with a block literal - is expected to equal true - #dot? with a dot - is expected to be truthy - with a unary method - is expected to be falsey - with a double colon is expected to be falsey without a dot is expected to be falsey - #arguments - with no arguments - is expected to equal true - with multiple mixed arguments - is expected to eq 2 - with a single literal argument - is expected to eq 1 - with a single splat argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - #negation_method? - with suffix `not` - is expected to be falsey - with prefix bang + with a double colon is expected to be truthy - with a non-negated method + #operator_method? + with a setter method is expected to be falsey - with prefix `not` - is expected to be truthy - #non_bare_access_modifier? - when node is a non-bare `private` + with a unary operator method is expected to be truthy - when node is not an access modifier + with a regular method is expected to be falsey - when node is a non-bare `module_function` + with a binary operator method is expected to be truthy - when node does not have an argument + #loop_keyword? + is expected to equal false + #assignment_method? + with a regular method is expected to be falsey - when node is a non-bare `protected` + with a comparison method + is expected to be falsey + with a bracket assignment method is expected to be truthy - when node is a non-bare `public` + with an assignment method is expected to be truthy - #nonmutating_binary_operator_method? + #nonmutating_operator_method? + with a regular method + is expected to be falsey + with a mutating binary operator method + is expected to be falsey with a nonmutating binary operator method is expected to be truthy + with a nonmutating unary operator method + is expected to be truthy + .new + with a safe navigation method send + is expected to equal true + with a regular method send + is expected to equal true + #nonmutating_string_method? with a regular method is expected to be falsey - with a mutating binary operator method + with a mutating String method is expected to be falsey - #lambda? - with a method named lambda in a class + with a nonmutating String 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 + #lambda_literal? with a non-lambda method is expected to be falsey - with a stabby lambda method - is expected to be truthy + with a stabby lambda + is expected to equal true + with `a.() {}` style method + is expected to be falsey with a lambda method - is expected to be truthy + is expected to equal false #first_argument - with multiple mixed arguments + with a single splat argument is expected to equal true - with a single literal argument + with no arguments is expected to equal true - with multiple literal arguments + with multiple mixed arguments is expected to equal true - with no arguments + with multiple literal arguments is expected to equal true - with a single splat argument + with a single literal argument is expected to equal true - #block_literal? - with no block - is expected to be falsey - with a block literal + #nonmutating_unary_operator_method? + with a nonmutating unary operator method is expected to be truthy - with a block argument + with a regular method is expected to be falsey + #parenthesized? + with arguments + when using parentheses + is expected to be truthy + when not using parentheses + is expected to be falsey + with no arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #receiver + with no receiver + is expected to equal true + with a variable receiver + is expected to equal true + with a literal receiver + is expected to equal true + #binary_operation?? + 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 + with a regular method call + is expected to equal false #setter_method? + with an indexed setter method + is expected to be truthy with a 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 - with an operator method + #nonmutating_array_method? + with a regular method is expected to be falsey - with an indexed setter method - is expected to be truthy - #assignment_method? - with a bracket assignment method + with a mutating Array method + is expected to be falsey + with a nonmutating Array method is expected to be truthy + #post_condition_loop? + is expected to equal false + #comparison_method? with a regular method is expected to be falsey - with an assignment method - is expected to be truthy - with a comparison method + with a negation method is expected to be falsey + with a comparison method + is expected to be truthy #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 - with a regular method call + #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 string + is expected to be falsey + when argument is a symbol + is expected to be falsey + #nonmutating_hash_method? + with a regular method is expected to be falsey - with a unary numeric operation + with a nonmutating Hash method + is expected to be truthy + with a mutating Hash method is expected to be falsey - #unary_operation? - with a unary operation + #arguments + with no arguments is expected to equal true - with an implicit call method - is expected to equal false - with a regular method call - is expected to equal false - with a binary operation - is expected to equal false - #attribute_accessor? - with an accessor - returns the accessor method and Array] - with a call without arguments - is expected to equal nil - #self_receiver? - with a non-self receiver + 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 + #lambda? + with a non-lambda method is expected to be falsey - with a self receiver + with a method named lambda in a class + is expected to be falsey + with a lambda method is expected to be truthy + with a stabby lambda method + is expected to be truthy + #self_receiver? with an implicit receiver is expected to be falsey - #def_modifier? - with several prefixed def modifiers - is expected to be truthy - with a prefixed def modifier + with a self receiver is expected to be truthy + with a non-self receiver + is expected to be falsey + #method_name + with a plain method + is expected to eq :bar + with a setter method + is expected to eq :bar= + with an operator method + is expected to eq :== + with an implicit call method + is expected to eq :call #macro? with a receiver - when parent is a class - is expected to be falsey when parent is a module is expected to be falsey + when parent is a class + is expected to be falsey without a receiver - when parent is a block - 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 - is expected to be truthy - when parent is a module - is expected to be truthy when parent is a method definition is expected to be falsey when parent is a singleton class is expected to be truthy - when parent is a class constructor - is expected to be truthy without a parent is expected to be truthy when parent is a begin without a parent is expected to be truthy - #predicate_method? - with a bang method + when parent is a block + is expected to be truthy + when parent is a module + is expected to be truthy + when parent is a class constructor + is expected to be truthy + when parent is a class + is expected to be truthy + #non_bare_access_modifier? + when node does not have an argument is expected to be falsey - with a predicate method - is expected to be truthy - with a regular method + when node is not an access modifier is expected to be falsey - #lambda_literal? - with a stabby lambda - is expected to equal true - with a non-lambda method + when node is a non-bare `private` + is expected to be truthy + when node is a non-bare `protected` + is expected to be truthy + when node is a non-bare `public` + is expected to be truthy + when node is a non-bare `module_function` + is expected to be truthy + #negation_method? + with prefix `not` + is expected to be truthy + with suffix `not` is expected to be falsey - with `a.() {}` style method + with prefix bang + is expected to be truthy + with a non-negated method is expected to be falsey - with a lambda method - is expected to equal false - #camel_case_method? + #predicate_method? with a regular method is expected to be falsey - with a camel case method + with a predicate method is expected to be truthy - #block_argument? - with regular arguments + with a bang method is expected to be falsey + #block_literal? with a block argument - is expected to be truthy - with mixed arguments - is expected to be truthy - with no arguments is expected to be falsey - -RuboCop::AST::YieldNode - #arguments - with no arguments - is expected to equal true - with multiple literal arguments - is expected to eq 2 - with multiple mixed arguments - is expected to eq 2 - with a single splat argument - is expected to eq 1 - with a single literal argument - is expected to eq 1 - #command? - when argument is a symbol - is expected to be truthy - when argument is a string + with a block literal is expected to be truthy - #const_receiver? - is expected to be falsey - #camel_case_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 - #block_argument? - is expected to be falsey - #setter_method? - is expected to be falsey - #self_receiver? - is expected to be falsey - #dot? - is expected to be falsey - #arguments? - with no arguments + with no block is expected to be falsey - with multiple mixed arguments - is expected to be truthy - with a single splat argument - is expected to be truthy - with multiple literal arguments + #def_modifier? + with a prefixed def modifier is expected to be truthy - with a single literal argument + with several prefixed def modifiers is expected to be truthy - #splat_argument? - with regular arguments + #prefix_not? + with a non-negated method is expected to be falsey - with a splat argument - is expected to be truthy - with mixed arguments - is expected to be truthy - with no arguments + with a bang method is expected to be falsey - #comparison_method? - is expected to be falsey - #assignment_method? - is expected to be falsey - #implicit_call? - is expected to be falsey - #predicate_method? - is expected to be falsey - #method_name - is expected to eq :yield - .new - is expected to equal true + with keyword `not` + is expected to be truthy #last_argument - with a single literal argument - is expected to equal true with no arguments is expected to equal true - with a single splat argument - is expected to equal true with multiple literal arguments is expected to equal true - with multiple mixed arguments - is expected to equal true - #block_literal? - is expected to be falsey - #macro? - is expected to be falsey - #first_argument with a single literal argument is expected to equal true - with no arguments - is expected to equal true - with multiple mixed arguments - is expected to equal true with a single splat argument is expected to equal true - with multiple literal arguments + with multiple mixed arguments is expected to equal true - #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 string - is expected to be falsey - when argument is a symbol - is expected to be falsey - #operator_method? - is expected to be falsey - #receiver - is expected to equal true - #block_node - is expected to equal true #bang_method? - is expected to be falsey - #double_colon? - is expected to be falsey - -RuboCop::AST::OrNode - #logical_operator? - with a logical or node - is expected to equal true - with a semantic or node - is expected to equal false - #lhs - with a logical or node - is expected to equal true - with a semantic 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 - #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 "||" - #semantic_operator? - with a logical or node - is expected to equal false - with a semantic 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 "||" - .new - with a logical or node - is expected to equal true - with a semantic or node - is expected to equal true + 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 RuboCop::AST::WhenNode .new is expected to equal true - #branch_index - is expected to eq 2 - is expected to eq 1 - is expected to eq 0 - #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 #body - without a then keyword - is expected to equal true with a then keyword is expected to equal true + without a then keyword + is expected to equal true #each_condition - when passed a block - yields all the conditions when not passed a block is expected to equal true + when passed a block + yields all the conditions #then? with a then keyword is expected to be truthy without a then keyword is expected to be falsey - -RuboCop::AST::ForwardArgsNode - when using Ruby 2.7 or newer - #to_a - is expected to contain exactly (be forward arg type) - -RuboCop::AST::Ext::Range - #line_span - accepts an `exclude_end` keyword argument - returns the range of lines a range occupies - -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::CaseMatchNode - when using Ruby 2.7 or newer - .new - is expected to equal true - #in_pattern_branches - is expected to all be in pattern type + #branch_index + is expected to eq 0 + is expected to eq 1 + is expected to eq 2 + #conditions + with a multiple conditions is expected to eq 3 - #else? - without an else statement - is expected to equal false - with an else statement - is expected to equal true - #each_in_pattern - when passed a block - yields all the conditions - when not passed a block - is expected to equal true - #else_branch - #else? - without an else statement - is expected to equal true - with an else statement - is expected to equal true - #keyword - is expected to eq "case" - -RuboCop::AST::ArrayNode - #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 truthy - is expected to be falsey - with a symbol percent literal - is expected to be falsey - is expected to be truthy - is expected to be truthy - #bracketed? - with a percent literal - is expected to equal true - with square brackets - is expected to equal true - unbracketed - is expected to equal nil - #values - with an array of literals is expected to all be literal - is expected to eq 3 - with an empty array - is expected to equal true - with an array of variables - is expected to eq 2 - is expected to all be send type - #each_value - with block - is expected to equal true - is expected to eq ["(int 1)", "(int 2)", "(int 3)"] - without block - is expected to equal true - #square_brackets? - with a percent literal - is expected to be falsey - with square brackets - is expected to be truthy - .new - is expected to equal true + with a single condition + is expected to eq 1 + is expected to all be literal RuboCop::AST::NodePattern in any order - 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 - yields captured value(s) and returns true if there is a block - returns captured values if there is no block without ellipsis with matching children behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with too few children + with too many children behaves like nonmatching doesn't match - with too many children + with too few children behaves like nonmatching doesn't match - with a captured ellipsis - 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 + doubled + separated by fixed argument + behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - nested + 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 + returns captured values if there is no block invalid with an ellipsis inside and outside behaves like invalid is invalid - at the beginning of a sequence + doubled with ellipsis behaves like invalid is invalid - nested + at the beginning of a sequence behaves like invalid is invalid containing ellipsis not at the end behaves like invalid is invalid - doubled with ellipsis + nested behaves like invalid is invalid captured without ellipsis behaves like single capture + yields captured value(s) and returns true if there is a block returns captured values if there is no block + 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 + 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 predicates - applied to an integer for which the predicate is true - 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 - with a named argument - with extra arguments - raises an error - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true - behaves like matching - matches - when not given - raises an error - when negated - behaves like matching - matches - when in last-child position, but all children have already been matched - behaves like nonmatching - doesn't match - applied to an integer for which the predicate is false - behaves like nonmatching - doesn't match - with one extra argument + with a constant argument for which the predicate is false behaves like nonmatching doesn't match @@ -3549,468 +1918,461 @@ for which the predicate is true behaves like matching matches + when negated + behaves like matching + matches in root position behaves like matching matches with name containing a numeral behaves like matching matches - at head position of a sequence - 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 + when not given + raises an error + with extra arguments + raises an error for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true behaves like matching matches - with a constant argument + applied to an integer for which the predicate is false + behaves like nonmatching + doesn't match + when in last-child position, but all children have already been matched + behaves like nonmatching + doesn't match + with one extra argument for which the predicate is true behaves like matching matches for which the predicate is false behaves like nonmatching doesn't match - captures which also perform a 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 - 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 - on a sequence + applied to an integer for which the predicate is true + behaves like matching + matches + at head position of a sequence + 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 + captures which also perform a match 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 - on a set + on a sequence behaves like single capture - returns captured values if there is no block yields captured value(s) and returns true if there is a block - on a literal + returns captured values if there is no block + on a set behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - captures within union - within nested sequences - behaves like multiple capture + 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 - 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 - on simple subpatterns + 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 + on a literal + behaves like single capture returns captured values if there is no block - with a different number of captures in each branch - behaves like invalid - is invalid - wildcards - unnamed wildcards - within a sequence + yields captured value(s) and returns true if there is a block + literals + bare literal + on a node + behaves like nonmatching + doesn't match + on a matching literal behaves like matching matches - at the root level + positive float literals + behaves like matching + matches + single quoted string literals + behaves like matching + matches + symbol literals + behaves like matching + matches + negative float literals + behaves like matching + matches + double quoted string literals + behaves like matching + matches + negative integer literals + 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 + negation + on a set + with a matching value + behaves like nonmatching + doesn't match + with a non-matching value behaves like matching matches - within a sequence with other patterns intervening + on a sequence + with a node with non-matching children behaves like matching matches - negated + with a node of different type + behaves like matching + matches + with a matching node behaves like nonmatching doesn't match + when nested in complex ways + with (send str :<< str) + behaves like nonmatching + doesn't match + with (send int :- int) + behaves like matching + matches + with (send str :+ (send str :to_i)) + behaves like matching + matches + on a string + with a matching string + behaves like nonmatching + doesn't match + with a non-matching symbol + behaves like matching + matches + 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 symbol + with a non-matching symbol + behaves like matching + matches + with a matching symbol + behaves like nonmatching + doesn't match + with a non-matching symbol, but too many children + behaves like nonmatching + doesn't match + wildcards + unnamed wildcards in head position of a sequence behaves like matching matches - named wildcards within a sequence with other patterns intervening behaves like matching matches - within a sequence - with values which can be unified - behaves like matching - matches - unifying the node type with an argument - behaves like matching - matches - with values which cannot be unified - behaves like nonmatching - doesn't match at the root level behaves like matching matches + negated + behaves like nonmatching + doesn't match + within a sequence + behaves like matching + matches + named wildcards + in head position of a sequence + behaves like matching + matches within a union + with a succeeding unifying constraint + with branches without the wildcard + encountered after + behaves like invalid + is invalid + encountered first + behaves like invalid + is invalid + 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 confined to the union without unification behaves like matching matches with partial unification + matching the unified branch + behaves like matching + matches that can not be unified behaves like nonmatching doesn't match matching the free branch behaves like matching matches - matching the unified branch - behaves like matching - matches with a preceding unifying constraint - that can not be unified - behaves like nonmatching - doesn't match matching a branch behaves like matching matches - with a succeeding unifying constraint - with all branches with the wildcard - matching another branch - behaves like matching - matches - that can not be unified - behaves like nonmatching - doesn't match - matching the first branch - behaves like matching - matches - with branches without the wildcard - encountered after - behaves like invalid - is invalid - encountered first - behaves like invalid - is invalid - in head position of a sequence - behaves like matching - matches - sequence with trailing ... - on a node with a different type - 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 non-matching children - behaves like nonmatching - doesn't match - on a node with fewer children, with a wildcard preceding - behaves like nonmatching - doesn't match - on a node with the same type and more children - with 2 children more + that can not be unified + behaves like nonmatching + doesn't match + 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 + within a sequence with other patterns intervening behaves like matching matches - with 1 child more + at the root level behaves like matching matches - simple sequence - with a nested sequence in non-head position + ellipsis + at the very beginning of a sequence behaves like matching matches - with a nested sequence in head position - behaves like invalid - is invalid - on a node with a different type + with a wildcard at the end, but no remaining child to match it behaves like nonmatching doesn't match - on a node with too many children + with a nested sequence at the end, but no remaining child behaves like nonmatching doesn't match - on a node with the same type and non-matching children - with non-matching receiver type - behaves like nonmatching - doesn't match - with non-matching selector - behaves like nonmatching - doesn't match - on a node with the same type and matching children - behaves like matching - matches - ellipsis - preceding a capture - behaves like single capture - yields captured value(s) and returns true if there is a block + preceding multiple captures + behaves like multiple capture returns captured values if there is no block - with a nodetype at the end, but no remaining child to match it - behaves like nonmatching - doesn't match + yields captured value(s) and returns true if there is a block with [] 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 - preceding multiple captures - behaves like multiple capture + with a nodetype 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 - at the very beginning of a sequence + unions + with a nested sequence behaves like matching matches - with a nested sequence at the end, but no remaining child - 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 - params - when negated, with a nonmatching value + nested inside a sequence 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 - as named parameters - when extra are provided - raises an ArgumentError - when provided as argument to match + at the top level + containing integer literals behaves like matching matches - when not provided - raises an ArgumentError - when negated, with a matching value - behaves like nonmatching - doesn't match - when preceded by ... + 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 string literals + behaves like matching + matches + containing multiple [] + on a node which meets some requirements but not all + behaves like nonmatching + doesn't match + on a node which meets all requirements of the second [] + behaves like matching + matches + on a node which meets all requirements of the first [] + behaves like matching + matches + containing mixed node and literals + behaves like matching + matches + commas + with commas randomly strewn around + behaves like invalid + is invalid + bare node type + on a node with the same type behaves like matching matches - when inside an intersection + #pattern + returns the pattern + #== + returns true iff the patterns are similar + #to_s + is instructive + #dup behaves like matching matches - in a nested sequence + yaml compatibility 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 - when inside a union, with a nonmatching value - behaves like nonmatching - doesn't match - without explicit number + on a node with a matching, hyphenated type behaves like matching matches - param number zero - in a position which does not match original target node - behaves like nonmatching - doesn't match - in a position which matches original target node - behaves like matching - matches - when inside a union, with a matching value + marshal compatibility behaves like matching matches - in root position - in root position - behaves like matching - matches + on a node with a different type + behaves like nonmatching + doesn't match + nil + against a node pattern (bug #5470) + behaves like nonmatching + doesn't match + nil value in AST, use nil? method behaves like matching matches - commas - with commas randomly strewn around + nil literals + behaves like matching + matches + nil value in AST + behaves like nonmatching + doesn't match + simple sequence + with a nested sequence in head position behaves like invalid is invalid - negation - on a sequence - with a matching node - behaves like nonmatching - doesn't match - with a node of different type - behaves like matching - matches - with a node with non-matching children - behaves like matching - matches - on a string - with a matching string - behaves like nonmatching - doesn't match - with a non-matching symbol - behaves like matching - matches - on a symbol - with a non-matching symbol - behaves like matching - matches - with a non-matching symbol, but too many children - behaves like nonmatching - doesn't match - with a matching symbol - behaves like nonmatching - doesn't match - on a set - with a non-matching value - behaves like matching - matches - with a matching value - behaves like nonmatching - doesn't match - when nested in complex ways - with (send str :<< str) + on a node with the same type and non-matching children + with non-matching receiver type behaves like nonmatching doesn't match - with (send str :+ (send str :to_i)) - behaves like matching - matches - with (send int :- int) - behaves like matching - matches - on square brackets - with a node which meets all requirements of [] + with non-matching selector behaves like nonmatching doesn't match - with a node which meets only 1 requirement of [] - behaves like matching - matches - bad syntax - with negated ellipsis - behaves like invalid - is invalid - with empty parentheses - behaves like invalid - is invalid - with empty intersection - behaves like invalid - is invalid - with doubled ellipsis - behaves like invalid - is invalid - with unmatched closing paren - behaves like invalid - is invalid - with leading comma in arg list - behaves like invalid - is invalid - with unmatched opening curly - behaves like invalid - is invalid - with unmatched opening paren and `...` - behaves like invalid - is invalid - with negated closing paren - behaves like invalid - is invalid - with unmatched closing curly - behaves like invalid - is invalid - with unmatched opening paren - behaves like invalid - is invalid - with doubled comma in arg list - behaves like invalid - is invalid - with negated closing curly - behaves like invalid - is invalid - with empty union - behaves like invalid - is invalid - nil - against a node pattern (bug #5470) + on a node with too many children behaves like nonmatching doesn't match - nil value in AST, use nil? method + on a node with the same type and matching children behaves like matching matches - nil value in AST - behaves like nonmatching - doesn't match - nil literals + with a nested sequence in non-head position behaves like matching matches + on a node with a different type + behaves like nonmatching + doesn't match captures on ... - with no remaining pattern at the end + with a remaining wildcard at the end behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block after a child behaves like single capture - returns captured values if there is no block yields captured value(s) and returns true if there is a block - with a remaining node type at the end - behaves like single capture returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with a remaining literal at the end + with a remaining sequence at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - at the very beginning of a sequence + with a remaining set 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 node type at the end + behaves like single capture yields captured value(s) and returns true if there is a block - with a remaining [] at the end + returns captured values if there is no block + 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 capture at the end behaves like multiple capture - returns captured values if there is no block yields captured value(s) and returns true if there is a block - with a remaining sequence at the end + returns captured values if there is no block + 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 a remaining set 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 wildcard 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 + yields captured value(s) and returns true if there is a block 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 + .descend + yields the given argument if it is not a Node + yields all children depth first caret (ascend) + 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 + with self in the wrong position + behaves like nonmatching + doesn't match within sequence not in head + behaves like matching + matches of a sequence behaves like matching matches - behaves like matching - matches in head - behaves like matching - matches of a sequence behaves like matching matches - inside an intersection - behaves like matching - matches + behaves like matching + matches used with a node type - which doesn't match - behaves like nonmatching - doesn't match which matches behaves like matching matches + which doesn't match + behaves like nonmatching + doesn't match inside a union behaves like matching matches - repeated twice + funcalls + without extra arguments + behaves like matching + matches + with one argument + behaves like matching + matches + with multiple arguments behaves like matching matches - 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 node type in seq head on a node with the same type @@ -4020,187 +2382,59 @@ behaves like nonmatching doesn't match for a child + on a child litteral + behaves like nonmatching + doesn't match on a child with the same type behaves like matching matches on a child with a different type behaves like nonmatching doesn't match - on a child litteral - behaves like nonmatching - doesn't match - captures on a wildcard - in non-head position in a sequence - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - in a nested sequence + descend + with a match multiple levels, depth first behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - in head position in a sequence against nil (bug #5470) - behaves like nonmatching - doesn't match - in head position in a sequence against literal (bug #5470) + without match behaves like nonmatching doesn't match - 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 - 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 - .descend - yields all children depth first - yields the given argument if it is not a Node - macros - 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_matcher - when it errors - raises an error with the right location - when called on matching code - behaves like matching - matches - when called on non-matching code - behaves like nonmatching - doesn't match - 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 matches - with a predicate name - when it errors - raises an error with the right location - when called on matching code - behaves like matching - matches - when called on non-matching code - behaves like nonmatching - doesn't match - with a pattern with captures - 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 - def_node_search - with a predicate name - 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 - without a predicate name - when called on non-matching code - returns an enumerator yielding nothing - when called on matching code - returns an enumerator yielding the captures - when the pattern contains keyword_params - returns an enumerator yielding the captures - when helper is called with default keyword_params - is overriden when calling the matcher - some defaults are not params - raises an error - and no value is given to the matcher - uses the defaults - when it errors - raises an error with the right location - literals - negative float literals - behaves like matching - matches - symbol literals - behaves like matching - matches - positive float literals - behaves like matching - matches - double quoted string literals - behaves like matching - matches - bare literal - on a matching literal - behaves like matching - matches - on a node - behaves like nonmatching - doesn't match - single quoted string literals - behaves like matching - matches - negative integer literals - 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 - funcalls - without extra arguments - behaves like matching - matches - with multiple arguments - behaves like matching - matches - with one argument + with a literal match behaves like matching matches - descend - with an immediate match - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block 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 - without match - behaves like nonmatching - doesn't match - with a match multiple levels, depth first + with an immediate match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with a literal match - behaves like matching - matches repeated - using * - without capture - behaves like matching - matches - with multiple subcaptures - behaves like multiple capture - yields captured value(s) and returns true if there is a block + 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 matching children behaves like single capture - yields captured value(s) and returns true if there is a block returns captured values if there is no block - with 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 behaves like repeated pattern with an ellipsis in the same sequence behaves like invalid @@ -4210,114 +2444,579 @@ 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 no match + yields captured value(s) and returns true if there is a block + with zero match behaves like nonmatching doesn't match - nested with multiple subcaptures - behaves like multiple capture - returns captured values if there is no block + using * + with zero match + behaves like single capture yields captured value(s) and returns true if there is a block - using ? + returns captured values if there is no block behaves like repeated pattern - at beginning of sequence + with an ellipsis in the same sequence behaves like invalid is invalid - with an ellipsis in the same sequence + at beginning of sequence behaves like invalid is invalid with one match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with zero match - behaves like single capture + 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 - with too many matching children + with no match behaves like nonmatching doesn't match - using + 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 - behaves like repeated pattern - at beginning of sequence - behaves like invalid - is invalid - with one match - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with an ellipsis in the same sequence - behaves like invalid - is invalid - with zero match - behaves like nonmatching - doesn't match - bare node type - #to_s - is instructive - on a node with the same type + 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 + without capture + behaves like matching + matches + sequence with trailing ... + on a node with the same type and more children + with 1 child more + behaves like matching + matches + with 2 children more + behaves like matching + matches + on a node with a different type + 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 - #== - returns true iff the patterns are similar - yaml compatibility + on a node with fewer children, with a wildcard preceding + behaves like nonmatching + doesn't match + on a node with non-matching children + behaves like nonmatching + doesn't match + params + in root position behaves like matching matches - on a node with a different type + in root position + behaves like matching + matches + without explicit number + behaves like matching + matches + when inside a union, with a nonmatching value behaves like nonmatching doesn't match - #pattern - returns the pattern - #dup + when negated, with a nonmatching value behaves like matching matches - on a node with a matching, hyphenated type + as named parameters + when extra are provided + raises an ArgumentError + when provided as argument to match + behaves like matching + matches + when not provided + raises an ArgumentError + when negated, with a matching value + behaves like nonmatching + doesn't match + when captured + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + when inside an intersection behaves like matching matches - marshal compatibility + when preceded by ... behaves like matching matches - unions - at the top level - containing string literals + 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 + in a nested sequence + behaves like matching + matches + param number zero + in a position which does not match original target node + behaves like nonmatching + doesn't match + in a position which matches original target node behaves like matching matches - containing multiple [] - on a node which meets all requirements of the first [] - behaves like matching - matches - on a node which meets some requirements but not all + when inside a union, with a matching value + behaves like matching + matches + macros + with a pattern without captures + def_node_search + with a predicate name + when it errors + raises an error with the right location + when called on matching code + behaves like matching + matches + when called on non-matching code + behaves like nonmatching + doesn't match + 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 + returns an enumerator yielding the matches + def_node_matcher + when called on non-matching code behaves like nonmatching doesn't match - on a node which meets all requirements of the second [] - behaves like matching - matches - containing mixed node and literals - behaves like matching - matches - containing integer literals - behaves like matching - matches - containing symbol literals - when the AST has a matching symbol + when called on matching code behaves like matching matches - when the AST does not have a matching symbol + when it errors + raises an error with the right location + with a pattern with captures + def_node_search + with a predicate name + 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 + 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 + returns an enumerator yielding the captures + when helper is called with default keyword_params + is overriden when calling the matcher + some defaults are not params + raises an error + and no value is given to the matcher + uses the defaults + def_node_matcher + 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 + when it errors + raises an error with the right location + when called on non-matching code behaves like nonmatching doesn't match - nested inside a sequence - behaves like matching - matches - with a nested sequence + with a pattern with a constant behaves like matching matches + when the value is not in the set + behaves like nonmatching + doesn't match + bad syntax + with unmatched closing curly + behaves like invalid + is invalid + with negated closing paren + 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 unmatched opening paren and `...` + behaves like invalid + is invalid + with empty union + behaves like invalid + is invalid + with empty intersection + behaves like invalid + is invalid + with unmatched opening curly + behaves like invalid + is invalid + with empty parentheses + behaves like invalid + is invalid + with doubled comma in arg list + behaves like invalid + is invalid + with doubled ellipsis + behaves like invalid + is invalid + with unmatched closing paren + behaves like invalid + is invalid + with negated ellipsis + behaves like invalid + is invalid + with unmatched opening paren + behaves like invalid + is invalid + captures on a wildcard + in head position in a sequence + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + in head position in a sequence against literal (bug #5470) + behaves like nonmatching + doesn't match + 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 a nested sequence + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + in head position in a sequence against nil (bug #5470) + behaves like nonmatching + doesn't match + 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 + within nested sequences + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + on simple subpatterns + 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::ProcessedSource + #following_line + returns source of line after token + #lines + is an array + contains lines as string without linefeed + has same number of elements as line count + token enumerables + #find_token + yields correct token + yields nil when there is no match + #each_token + yields all tokens + #comments + is an array of comments + when the source is invalid + returns [] + #path + is the path passed to .new + #[] + when a range is passed + returns the array of lines + when start index and length are passed + returns the array of lines + when an index is passed + returns the line + valid_syntax? + when the source is valid but has some warning diagnostics + 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 invalid + returns false + when the source is completely valid + returns true + when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI + returns true + #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 + #ast + is the root node of AST + #preceding_line + returns source of line before 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 was properly parsed + is nil + when the source could not be parsed due to encoding error + returns the error + with heavily commented source + #line_with_comment? + returns true for lines with comments + returns false for lines without comments + #each_comment + yields all comments + #comments_before_line + returns comments on or before given line + #contains_comment? + provided source_range on line without comment + is expected to equal false + 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 comment line + is expected to equal true + #find_comment + yields correct comment + yields nil when there is no match + #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 + #buffer + is a source buffer + .from_file + raises a Errno::ENOENT when the file does not exist + when the file exists + returns an instance of ProcessedSource + sets the file path to the instance's #path + #blank? + with source of no content + returns true + with source with content + returns false + #file_path + returns file path + #tokens + has an array of tokens + +RuboCop::AST::ModuleNode + #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::BreakNode + behaves like wrapped arguments node + .new + with arguments + is expected to equal true + without arguments + is expected to equal true + #arguments + with no arguments + is expected to equal true + 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 a single splat argument + is expected to eq 1 + with a single argument + is expected to eq 1 + +RuboCop::AST::IntNode + #sign? + explicit positive int + is expected to be truthy + explicit negative int + is expected to be truthy + .new + is expected to be truthy + #value + is expected to eq 10 + +RuboCop::AST::IfNode + #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 "" + #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 + #each_branch + when not passed a block + is expected to equal true + when passed a block + yields all the branches + #branches + with an unless statement + is expected to all be literal + is expected to eq 1 + with an else statement + is expected to all be literal + is expected to eq 2 + with an elsif statement + is expected to all be literal + is expected to eq 3 + with an if statement + is expected to eq 1 + is expected to all be literal + #if? + with an unless statement + is expected to be falsey + with an if statement + is expected to be truthy + with a ternary operator + is expected to be falsey + #elsif? + with an if statement comtaining an elsif + is expected to be falsey + without an elsif statement + is expected to be falsey + with an elsif statement + is expected to be truthy + #else? + without an else statement + is expected to be falsey + with an elsif statement + is expected to be truthy + #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 + #elsif_conditional? + with nested conditionals in else clause + is expected to be falsey + with one elsif conditional + is expected to be truthy + with nested ternary operators + when nested in the truthy branch + is expected to be falsey + when nested in the falsey branch + is expected to be falsey + with nested conditionals in if clause + is expected to be falsey + with multiple elsif conditionals + is expected to be truthy + .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 + #modifier_form? + 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 unless statement + is expected to be truthy + with a ternary operator + is expected to be falsey + with a modifier if statement + is expected to be truthy + #else_branch + with an unless statement + is expected to equal true + with a ternary operator + is expected to equal true + with an if statement + is expected to equal true + #inverse_keyword? + with a ternary operator + is expected to eq "" + with an unless statement + is expected to eq "if" + with an if statement + is expected to eq "unless" + #if_branch + with an unless statement + is expected to equal true + with a ternary operator + is expected to equal true + with an if statement + is expected to equal true + #nested_conditional? + with nested conditionals in else clause + is expected to be truthy + with nested ternary operators + when nested in the truthy branch + is expected to be truthy + when nested in the falsey branch + is expected to be truthy + with no nested conditionals + is expected to be falsey + with nested conditionals in if clause + is expected to be truthy + with nested conditionals in elsif clause + is expected to be truthy + +RuboCop::AST::CaseMatchNode + when using Ruby 2.7 or newer + #each_in_pattern + when not passed a block + is expected to equal true + when passed a block + yields all the conditions + #in_pattern_branches + is expected to all be in pattern type + is expected to eq 3 + #keyword + is expected to eq "case" + .new + is expected to equal true + #else? + without an else statement + is expected to equal false + with an else statement + is expected to equal true + #else_branch + #else? + without an else statement + is expected to equal true + with an else statement + is expected to equal true RuboCop::AST::ArgsNode + .new + with a block + is expected to equal true + with a method definition + is expected to equal true + with a lambda literal + is expected to equal true #empty_and_without_delimiters? with empty arguments with a lambda literal @@ -4326,61 +3025,1397 @@ is expected to equal true with a method definition is expected to equal true - with arguments + with delimiters with a lambda literal is expected to equal false - with a method definition + with a block is expected to equal false - with delimiters with a method definition is expected to equal false - with a block + with arguments + with a method definition is expected to equal false with a lambda literal is expected to equal false + +RuboCop::AST::WhileNode + #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" + #keyword + is expected to eq "while" .new - with a block + with a statement while is expected to equal true - with a lambda literal + with a modifier while is expected to equal true - with a method definition + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #loop_keyword? + with a modifier while + is expected to be truthy + with a statement while + is expected to be truthy + +RuboCop::AST::RegexpNode + #percent_r_literal? + with multi-line %r{-delimiters + is expected to eq true + with %r{-delimiters + is expected to eq true + with %r<-delimiters + is expected to eq true + with /-delimiters + is expected to eq false + with %r/-delimiters + is expected to eq true + #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 %r<-delimiters + is expected to eq false + with multi-line %r{-delimiters + is expected to eq false + #extended? + with only x option + is expected to equal true + with x and other options + is expected to equal true + with other options + is expected to equal false + with no options + is expected to equal 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 + #multiline_mode? + with other options + is expected to equal false + with only m option + is expected to equal true + with m and other options + is expected to equal true + with no options + is expected to equal false + #ignore_case? + with other options + is expected to equal false + with i and other options + is expected to equal true + with only i option + is expected to equal true + with no options + is expected to equal false + #regopt + with a regexp without option + is expected to equal true + is expected to equal true + with a multi-line regexp without option + is expected to equal true + is expected to equal true + with an empty regexp with option + is expected to eq [:i, :x] is expected to equal true + with a regexp with option + is expected to equal true + is expected to eq [:i, :m, :x] + with a multi-line regexp with option + is expected to equal true + is expected to eq [:i, :m, :x] + with an empty regexp + is expected to equal true + is expected to equal true + #content + with a regexp with option + is expected to eq ".+" + with a multi-line regexp without option + is expected to eq "\n.+\n" + with a regexp without option + is expected to eq ".+" + with a multi-line regexp with option + is expected to eq "\n.+\n" + with an empty regexp + is expected to eq "" + with an empty regexp with option + is expected to eq "" + #to_regexp + with a regexp without option + is expected to eq /.+/ + with a regexp with option + is expected to eq /.+/mix + with an empty regexp with option + is expected to eq //ix + 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 multi-line regexp without option + is expected to eq / +.+ +/ + with an empty regexp + is expected to eq // + .new + is expected to equal true + #single_interpolation? + with other options + is expected to equal false + with only o option + is expected to equal true + with no options + is expected to equal false + with o and other options + is expected to equal true + #no_encoding? + with only n option + is expected to equal true + with n and other options + is expected to equal true + with no options + is expected to equal false + with other options + is expected to equal false + #delimiter? + with multi-line %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 + 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 true + 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 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 %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 false + with /-delimiters + is expected to eq true + is expected to eq false + #delimiters + with multi-line %r{-delimiters + is expected to eq ["{", "}"] + with /-delimiters + is expected to eq ["/", "/"] + with %r<-delimiters + is expected to eq ["<", ">"] + with %r/-delimiters + is expected to eq ["/", "/"] + with %r{-delimiters + is expected to eq ["{", "}"] -RuboCop::AST::RangeNode +RuboCop::AST::YieldNode + #arguments + with multiple mixed arguments + is expected to eq 2 + with a single splat argument + 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 literal argument + is expected to eq 1 + #camel_case_method? + is expected to be falsey + #last_argument + with multiple mixed arguments + is expected to equal true + with a single literal argument + is expected to equal true + with no arguments + is expected to equal true + with a single splat argument + is expected to equal true + with multiple literal arguments + is expected to equal true + #comparison_method? + 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 regular arguments + is expected to be falsey + with no arguments + is expected to be falsey + #assignment_method? + is expected to be falsey + #block_argument? + is expected to be falsey .new - with an infinite range + is expected to equal true + #self_receiver? + is expected to be falsey + #block_node + is expected to equal true + #receiver + is expected to equal true + #double_colon? + is expected to be falsey + #command? + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #arguments? + with a single splat argument + is expected to be truthy + with no arguments + is expected to be falsey + 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 + #first_argument + with no arguments is expected to equal true + with multiple literal arguments is expected to equal true - with a beignless range + with a single splat argument is expected to equal true + with multiple mixed arguments is expected to equal true - with an exclusive range + with a single literal argument is expected to equal true + #dot? + is expected to be falsey + #implicit_call? + is expected to be falsey + #macro? + 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 + #block_literal? + 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 + #operator_method? + is expected to be falsey + #predicate_method? + is expected to be falsey + #const_receiver? + is expected to be falsey + #setter_method? + is expected to be falsey + #method_name + is expected to eq :yield + #bang_method? + is expected to be falsey + +RuboCop::AST::ReturnNode + behaves like wrapped arguments node + #arguments + with a single argument and braces + is expected to eq 1 + with a single argument + is expected to eq 1 + with a single splat argument + is expected to eq 1 + with no arguments and braces + is expected to equal true + with no arguments + is expected to equal true + with multiple literal arguments + is expected to eq 2 + .new + with arguments + is expected to equal true + without arguments + 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) + +RuboCop::AST::Node + #argument_type? + block arguments + returns true for all argument types + method arguments + returns true for all argument types + #class_constructor? + class definition with a block + matches + class definition + does not match + class definition on outer scope + matches + module definition with a block + matches + #recursive_basic_literal? + 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 `%r{abx#{foo}}ixo` + behaves like literal + returns true for `'str'` + behaves like non literal + returns false for `/.#{some_method_call}/` + behaves like literal + returns true for `%r{abx}ixo` + behaves like literal + returns true for `!true` + behaves like non literal + returns false for `(x && false)` + behaves like literal + returns true for `"#{2}"` + behaves like literal + returns true for `{ a: 1, b: 2 }` + behaves like non literal + returns false for `{ :sym => some_method_call }` + behaves like literal + returns true for `(1)` + behaves like non literal + returns false for `{ some_method_call => :sym }` + behaves like non literal + returns false for `(x or false)` + behaves like non literal + returns false for `[some_method_call]` + behaves like non literal + returns false for `some_method_call` + behaves like literal + returns true for `1` + behaves like literal + returns true for `(false && true)` + behaves like literal + returns true for `(false or true)` + behaves like literal + returns true for `1.0` + behaves like literal + returns true for `/./` + behaves like non literal + returns false for `(x == false)` + behaves like literal + returns true for `false` + behaves like literal + returns true for `(false <=> true)` + behaves like literal + returns true for `nil` + behaves like non literal + returns false for `some_method_call(x, y)` + #struct_constructor? + ::Struct + matches + struct definition without block + does not match + struct definition with a block + matches + #value_used? + at the end of a block + 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 a method call node + is always true + within a module definition node + is always true + within a singleton class node + is always true + at the top level + is false + within a class definition node + is always true + within an array literal + at the top level + is always false + assigned to an ivar + is always true + within a while node + is true only for the condition + #pure? + for an lvar assignment + returns false + for a class definition + returns false + 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 cvar assignment + returns false + for a regexp + with options + returns true + with interpolated segments + returns false + with no interpolation + returns true + for an integer literal + returns true + for an array literal + which contains a method call + returns false + with only literal children + returns true + for a module definition + returns false + for a method call + returns false + for a gvar assignment + returns false + for a nested if + where one branch contains an assignment statement + returns false + where one branch contains a method call + returns false + where the innermost descendants are local vars and literals + returns true + #module_definition? + with ::ModuleName + matches + prepend Module.new + matches + using module keyword + matches + nested modules + matches + with Module.new + matches + namespaced modules + matches + included module definition + matches + #sibling_index + returns its sibling index + #class_definition? + with Struct + matches + with self singleton class + matches + constant defined as Struct without block + does not match + without inheritance + matches + with Class.new + matches + with ::ClassName + matches + with inheritance + matches + with object singleton class + matches + namespaced class + matches + +RuboCop::AST::ResbodyNode + .new + 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" + #body + is expected to equal true + +RuboCop::AST::SelfClassNode + .new + is expected to equal true + #identifier + is expected to equal true + #body + with an empty body + is expected to equal nil + with a multi-expression body is expected to equal true - with an inclusive range + with a single expression body + is expected to equal true + +RuboCop::AST::AliasNode + #old_identifier + is expected to equal true + is expected to eq :bar + .new + is expected to equal true + #new_identifier + is expected to equal true + is expected to eq :foo + +RuboCop::AST::ArrayNode + #square_brackets? + with square brackets + is expected to be truthy + with a percent literal + is expected to be falsey + #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 truthy + is expected to be falsey + with a symbol percent literal + is expected to be falsey + is expected to be truthy + is expected to be truthy + #values + with an array of literals + 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 + #each_value + without block + is expected to equal true + with block + is expected to eq ["(int 1)", "(int 2)", "(int 3)"] + is expected to equal true + .new + is expected to equal true + #bracketed? + with square brackets is expected to equal true + unbracketed + is expected to equal nil + with a percent literal is expected to equal true -RuboCop::AST::StrNode +RuboCop::AST::CaseNode + #branches + when there is no else keyword + returns only then when bodies + 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 + #keyword + is expected to eq "case" .new - with a normal string + is expected to equal true + #when_branches + is expected to all be when type + is expected to eq 3 + #each_when + when passed a block + yields all the conditions + when not passed a block is expected to equal true - with a heredoc + #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 + +RuboCop::AST::DefNode + #self_receiver? + with a singleton method definition + is expected to be falsey + with a class method definition + is expected to be truthy + with an instance method definition + 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 + #arguments? + with multiple regular arguments + is expected to be truthy + with a single rest argument + is expected to be truthy + with no arguments + is expected to be falsey + with a single keyword argument + is expected to be truthy + with a single regular argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + #bang_method? + with a regular method + is expected to be falsey + with a bang method + is expected to be truthy + with a predicate method + is expected to be falsey + #comparison_method? + with a regular method + is expected to be falsey + with a comparison 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 message matches + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #last_argument + with multiple regular arguments is expected to equal true - with a string with interpolation + with no arguments is expected to equal true - #heredoc? - with a heredoc + with a single keyword argument is expected to equal true - with a string with interpolation + with a single rest argument + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single regular argument + is expected to equal true + #assignment_method? + with a comparison method + is expected to be falsey + with a regular 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 + #rest_argument? + with mixed arguments + is expected to be truthy + with a rest argument + is expected to be truthy + with no arguments + is expected to be falsey + with regular arguments + is expected to be falsey + .new + with a defs node + is expected to equal true + with a def node + is expected to equal true + #camel_case_method? + with a regular method + is expected to be falsey + with a camel case method + is expected to be truthy + #const_receiver? + with an instance method definition + is expected to be falsey + with a class method definition + is expected to be falsey + with a singleton method definition + is expected to be truthy + #operator_method? + with a setter method + is expected to be falsey + with a regular method + is expected to be falsey + with a binary operator method + is expected to be truthy + with a unary operator method + is expected to be truthy + #first_argument + with a single rest argument + is expected to equal true + with multiple mixed arguments + is expected to equal true + with no arguments + is expected to equal true + with a single keyword argument + is expected to equal true + with a single regular argument + is expected to equal true + with multiple regular arguments + is expected to equal true + #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 + when using Ruby 2.7 or newer + #argument_forwarding? + is expected to be truthy + #receiver + with an instance method definition + is expected to equal true + with a class method definition + is expected to equal true + with a singleton method definition + is expected to equal true + #body + with a multi-expression body + is expected to equal true + with no body + is expected to equal true + with a single expression body + is expected to equal true + #arguments + with multiple mixed arguments + is expected to eq 2 + with multiple regular arguments + is expected to eq 2 + with argument forwarding + is expected to eq 1 + with a single regular argument + is expected to eq 1 + with no arguments + is expected to equal true + with a single rest argument + is expected to eq 1 + #void_context? + with a bracket assignment method + is expected to be truthy + with an initializer method + is expected to be truthy + with a comparison method + is expected to be falsey + with a regular method + is expected to be falsey + with a regular assignment method + is expected to be truthy + #block_argument? + with regular arguments + is expected to be falsey + with a block argument + is expected to be truthy + with no arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + +RuboCop::AST::ForNode + #keyword + is expected to eq "for" + #collection + is expected to equal true + .new + is expected to equal true + #variable + is expected to equal true + #post_condition_loop? + is expected to be falsey + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #body + is expected to equal true + #void_context? + without a do keyword + is expected to be truthy + with a do keyword + is expected to be truthy + #loop_keyword? + is expected to be truthy + +RuboCop::AST::LambdaNode + #receiver + is expected to eq nil + #arguments + is expected to eq 2 + #method_name + is expected to eq :lambda + +RuboCop::AST::NextNode + behaves like wrapped arguments node + #arguments + with a single argument and braces + 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 and braces + is expected to equal true + with a single splat argument + is expected to eq 1 + with no arguments + is expected to equal true + .new + without arguments + is expected to equal true + with arguments + is expected to equal true + +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::SuperNode + #macro? + is expected to be falsey + #assignment_method? + is expected to be falsey + #method_name + is expected to eq :super + #double_colon? + is expected to be falsey + #last_argument + with multiple literal arguments + is expected to equal true + with no arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single literal argument + is expected to equal true + with a single splat argument + is expected to equal true + #setter_method? + is expected to be falsey + #receiver + is expected to equal true + #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 + #comparison_method? + is expected to be falsey + #camel_case_method? + is expected to be falsey + #first_argument + with a single literal argument + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single splat argument + is expected to equal true + with no arguments + is expected to equal true + with multiple literal arguments + is expected to equal true + #parenthesized? + with arguments + when using parentheses + is expected to be truthy + when not using parentheses + is expected to be falsey + with no arguments + when using parentheses + is expected to be truthy + when not using parentheses + is expected to be falsey + .new + with a super node + is expected to equal true + with a zsuper node + is expected to equal true + #implicit_call? + is expected to be falsey + #dot? + is expected to be falsey + #arguments? + with a single splat argument + is expected to be truthy + with a single literal argument + is expected to be truthy + with no arguments + is expected to be falsey + with multiple mixed arguments + is expected to be truthy + with multiple literal arguments + is expected to be truthy + #command? + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + #block_literal? + with no block + is expected to be falsey + with a block argument + is expected to be falsey + with a block literal + is expected to be truthy + #bang_method? + is expected to be falsey + #block_node + with a block argument + is expected to equal true + with no block + is expected to equal true + with a block literal + is expected to equal true + #operator_method? + 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 + #const_receiver? + is expected to be falsey + #arguments + with no arguments + is expected to equal true + with a single literal argument + is expected to eq 1 + with a single splat argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + with multiple mixed arguments + is expected to eq 2 + #self_receiver? + is expected to be falsey + #predicate_method? + is expected to be falsey + #block_argument? + with mixed arguments + is expected to be truthy + with no arguments + is expected to be falsey + with a block argument + is expected to be truthy + with regular arguments + is expected to be falsey + +RuboCop::AST::OrNode + #alternate_operator + with a logical or node + is expected to eq "or" + with a semantic or node + is expected to eq "||" + #logical_operator? + with a semantic or node is expected to equal false - with a normal string + 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 + #inverse_operator + with a semantic or node + is expected to eq "and" + with a logical or node + is expected to eq "&&" + #rhs + with a semantic or node + is expected to equal true + with a logical or node + is expected to equal true + .new + with a logical or node + is expected to equal true + with a semantic or node + is expected to equal true + #semantic_operator? + with a logical or node is expected to equal false + with a semantic or node + is expected to equal true + #operator + with a semantic or node + is expected to eq "or" + with a logical or node + is expected to eq "||" + +RuboCop::AST::SymbolNode + .new + with a symbol node + is expected to equal true + #value + is expected to eq :foo + +RuboCop::AST::KeywordSplatNode + #operator + is expected to eq "**" + #value + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + .new + is expected to equal true + #key_delta + with alignment set to :left + when using hash rocket delimiters + when keyword splat is behind + is expected to eq -2 + when keyword splat is aligned + is expected to eq 0 + when keyword splat is ahead + is expected to eq 2 + when keyword splat is on the same line + is expected to eq 0 + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is ahead + is expected to eq 2 + when keyword splat is behind + is expected to eq -2 + when keyword splat is aligned + is expected to eq 0 + with alignment set to :right + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when keyword splat is aligned + is expected to eq 0 + when using hash rocket 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 0 + when keyword splat is ahead + is expected to eq 0 + #hash_rocket? + is expected to be falsey + #colon? + is expected to be falsey + #value_delta + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when using hash rocket delimiters + when keyword splat is behind + is expected to eq 0 + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + #key + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + #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 + +RuboCop::AST::Ext::Range + #line_span + returns the range of lines a range occupies + accepts an `exclude_end` keyword argument + +RuboCop::AST::ClassNode + #parent_class + when a parent class is specified + is expected to equal true + when no parent class is specified + is expected to equal nil + #identifier + is expected to equal true + #body + with an empty body + is expected to equal nil + with a multi-expression body + is expected to equal true + with a single expression body + is expected to equal true + .new + is expected to equal true + +RuboCop::AST::RangeNode + .new + with an exclusive 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 infinite range + is expected to equal true + is expected to equal true + with an inclusive range + is expected to equal true + is expected to equal true + +RuboCop::AST::PairNode + #key_delta + with alignment set to :right + when using hash rocket delimiters + when keys are aligned + when second key is a keyword splat + is expected to eq 0 + when both keys are explicit keys + is expected to eq 0 + when both keys are on the same line + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when receiver key is ahead + when both pairs are explicit pairs + is expected to eq 2 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is behind + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq -2 + when using colon delimiters + when both keys are on the same line + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is behind + when second pair is a keyword splat + is expected to eq 0 + when both pairs are reail pairs + is expected to eq -2 + when keys are aligned + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is ahead + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 2 + with alignment set to :left + when using colon 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 receiver key is behind + when second pair is a keyword splat + is expected to eq -2 + when both pairs are reail pairs + is expected to eq -2 + when keys are aligned + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when both keys are on the same line + when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 + when using hash rocket delimiters + when both keys are on the same line + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when receiver key is ahead + when second pair is a keyword splat + is expected to eq 2 + when both pairs are explicit pairs + is expected to eq 2 + when receiver key is behind + when second pair is a keyword splat + is expected to eq -2 + when both pairs are explicit pairs + is expected to eq -2 + 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 + #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 "=>" + #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 ":" + .new + is expected to equal true + #key + when using a symbol key + is expected to equal true + when using a string key + is expected to equal true + #same_line? + when pairs are on separate lines + when last pair is a keyword splat + is expected to be falsey + when both pairs are explicit pairs + is expected to be falsey + when a multiline pair shares the same line + when last pair is a keyword splat + is expected to be truthy + is expected to be truthy + when both pairs are explicit pairs + is expected to be truthy + is expected to be truthy + when both pairs are on the same line + when both pairs are explicit pairs + is expected to be truthy + when both pair is a keyword splat + is expected to be truthy + #hash_rocket? + when using a colon delimiter + is expected to be falsey + when using a hash rocket delimiter + is expected to be truthy + #value_delta + when using colon delimiters + when both pairs are on the same line + is expected to eq 0 + when values are aligned + when both pairs are explicit pairs + is expected to eq 0 + when second pair is a keyword splat + is expected to eq 0 + when receiver value is ahead + is expected to eq 2 + when receiver value is behind + is expected to eq -2 + when using hash rocket delimiters + 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 ahead + is expected to eq 2 + when receiver value is behind + is expected to eq -2 + when both pairs are on the same line + is expected to eq 0 + #value + is expected to equal true + #colon? + when using a colon delimiter + is expected to be truthy + when using a hash rocket delimiter + is expected to be falsey + #value_on_new_line? + when value starts on a new line + is expected to be truthy + when pair is on a single line + is expected to be falsey + when value spans multiple lines + is expected to be falsey -Finished in 4.37 seconds (files took 1.55 seconds to load) +Finished in 1.62 seconds (files took 1.09 seconds to load) 1401 examples, 0 failures -Randomized with seed 13879 +Randomized with seed 41341 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -4411,12 +4446,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/3462034/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/3462034/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/1374284 and its subdirectories -I: Current time: Mon Feb 13 11:25:34 -12 2023 -I: pbuilder-time-stamp: 1676330734 +I: removing directory /srv/workspace/pbuilder/3462034 and its subdirectories +I: Current time: Wed Jan 12 07:03:13 +14 2022 +I: pbuilder-time-stamp: 1641920593