Diff of the two buildlogs: -- --- b1/build.log 2021-08-24 17:36:14.806059619 +0000 +++ b2/build.log 2021-08-24 17:38:00.058117318 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue Aug 24 05:34:46 -12 2021 -I: pbuilder-time-stamp: 1629826486 +I: Current time: Wed Aug 25 07:36:22 +14 2021 +I: pbuilder-time-stamp: 1629826582 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.MlfxXWEW/trustedkeys.kbx': General error -gpgv: Signature made Tue Aug 18 17:57:28 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.pPE14Rqh/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/3855/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/26336/tmp/hooks/D01_modify_environment starting +debug: Running on virt64a. +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/26336/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/26336/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='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=3' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='armhf' + 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]="arm-unknown-linux-gnueabihf") + 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=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=4' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='c80d9ef1675f425b8c82edb96de74ac4' - 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='3855' - PS1='# ' - PS2='> ' + INVOCATION_ID=e54ad6277a794661831f1070d01924ad + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=26336 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.6yn7Qrmt95/pbuilderrc_dsVP --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.6yn7Qrmt95/b1 --logfile b1/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' - SUDO_GID='113' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:8000/' + 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.6yn7Qrmt95/pbuilderrc_v2sJ --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.6yn7Qrmt95/b2 --logfile b2/build.log ruby-rubocop-ast_0.3.0+dfsg-1.dsc' + SUDO_GID=114 + SUDO_UID=108 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:8000/ I: uname -a - Linux virt32c 5.10.0-8-armmp-lpae #1 SMP Debian 5.10.46-4 (2021-08-03) armv7l GNU/Linux + Linux i-capture-the-hostname 5.10.0-8-arm64 #1 SMP Debian 5.10.46-4 (2021-08-03) aarch64 GNU/Linux I: ls -l /bin total 3580 - -rwxr-xr-x 1 root root 816764 Aug 4 08:25 bash - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 26052 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 26052 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 9636 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 26668 Sep 22 2020 cat - -rwxr-xr-x 1 root root 43104 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 38984 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 43112 Sep 22 2020 chown - -rwxr-xr-x 1 root root 92616 Sep 22 2020 cp - -rwxr-xr-x 1 root root 75524 Dec 10 2020 dash - -rwxr-xr-x 1 root root 75880 Sep 22 2020 date - -rwxr-xr-x 1 root root 55436 Sep 22 2020 dd - -rwxr-xr-x 1 root root 59912 Sep 22 2020 df - -rwxr-xr-x 1 root root 96764 Sep 22 2020 dir - -rwxr-xr-x 1 root root 55012 Jul 28 07:09 dmesg - lrwxrwxrwx 1 root root 8 Nov 6 2019 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Nov 6 2019 domainname -> hostname - -rwxr-xr-x 1 root root 22508 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 22496 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 47492 Jul 28 07:09 findmnt - -rwsr-xr-x 1 root root 26076 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 124508 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 11:30 gzexe - -rwxr-xr-x 1 root root 64212 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 13784 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 43180 Sep 22 2020 ln - -rwxr-xr-x 1 root root 35068 Feb 7 2020 login - -rwxr-xr-x 1 root root 96764 Sep 22 2020 ls - -rwxr-xr-x 1 root root 99940 Jul 28 07:09 lsblk - -rwxr-xr-x 1 root root 51408 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 43184 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 30780 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 34408 Jul 28 07:09 more - -rwsr-xr-x 1 root root 34400 Jul 28 07:09 mount - -rwxr-xr-x 1 root root 9824 Jul 28 07:09 mountpoint - -rwxr-xr-x 1 root root 88524 Sep 22 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 03:38 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 26652 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Aug 4 08:25 rbash -> bash - -rwxr-xr-x 1 root root 30740 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 43104 Sep 22 2020 rm - -rwxr-xr-x 1 root root 30732 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 14144 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 76012 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Aug 20 21:25 sh -> dash - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 55360 Sep 22 2020 stty - -rwsr-xr-x 1 root root 46704 Jul 28 07:09 su - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sync - -rwxr-xr-x 1 root root 340872 Feb 16 2021 tar - -rwxr-xr-x 1 root root 9808 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 67696 Sep 22 2020 touch - -rwxr-xr-x 1 root root 22496 Sep 22 2020 true - -rwxr-xr-x 1 root root 9636 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 22108 Jul 28 07:09 umount - -rwxr-xr-x 1 root root 22520 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 96764 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 38512 Jul 28 07:09 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 11:30 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 11:30 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 11:30 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 11:30 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 11:30 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 11:30 zless - -rwxr-xr-x 1 root root 1842 Mar 2 11:30 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 11:30 znew -I: user script /srv/workspace/pbuilder/3855/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 816764 Aug 5 10:25 bash + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 26052 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 26052 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 9636 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 26668 Sep 23 2020 cat + -rwxr-xr-x 1 root root 43104 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 38984 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 43112 Sep 23 2020 chown + -rwxr-xr-x 1 root root 92616 Sep 23 2020 cp + -rwxr-xr-x 1 root root 75524 Dec 11 2020 dash + -rwxr-xr-x 1 root root 75880 Sep 23 2020 date + -rwxr-xr-x 1 root root 55436 Sep 23 2020 dd + -rwxr-xr-x 1 root root 59912 Sep 23 2020 df + -rwxr-xr-x 1 root root 96764 Sep 23 2020 dir + -rwxr-xr-x 1 root root 55012 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 22508 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 22496 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 47492 Jul 29 09:09 findmnt + -rwsr-xr-x 1 root root 26076 Feb 27 06:12 fusermount + -rwxr-xr-x 1 root root 124508 Nov 10 2020 grep + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 gunzip + -rwxr-xr-x 1 root root 6376 Mar 3 13:30 gzexe + -rwxr-xr-x 1 root root 64212 Mar 3 13:30 gzip + -rwxr-xr-x 1 root root 13784 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 43180 Sep 23 2020 ln + -rwxr-xr-x 1 root root 35068 Feb 8 2020 login + -rwxr-xr-x 1 root root 96764 Sep 23 2020 ls + -rwxr-xr-x 1 root root 99940 Jul 29 09:09 lsblk + -rwxr-xr-x 1 root root 51408 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 43184 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 30780 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 34408 Jul 29 09:09 more + -rwsr-xr-x 1 root root 34400 Jul 29 09:09 mount + -rwxr-xr-x 1 root root 9824 Jul 29 09:09 mountpoint + -rwxr-xr-x 1 root root 88524 Sep 23 2020 mv + lrwxrwxrwx 1 root root 8 Nov 8 2019 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 19 05:38 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 26652 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Aug 5 10:25 rbash -> bash + -rwxr-xr-x 1 root root 30740 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 43104 Sep 23 2020 rm + -rwxr-xr-x 1 root root 30732 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 14144 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 76012 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Aug 25 07:36 sh -> bash + lrwxrwxrwx 1 root root 4 Aug 21 23:25 sh.distrib -> dash + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 55360 Sep 23 2020 stty + -rwsr-xr-x 1 root root 46704 Jul 29 09:09 su + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sync + -rwxr-xr-x 1 root root 340872 Feb 17 2021 tar + -rwxr-xr-x 1 root root 9808 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 67696 Sep 23 2020 touch + -rwxr-xr-x 1 root root 22496 Sep 23 2020 true + -rwxr-xr-x 1 root root 9636 Feb 27 06:12 ulockmgr_server + -rwsr-xr-x 1 root root 22108 Jul 29 09:09 umount + -rwxr-xr-x 1 root root 22520 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 uncompress + -rwxr-xr-x 1 root root 96764 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 38512 Jul 29 09:09 wdctl + lrwxrwxrwx 1 root root 8 Nov 8 2019 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Mar 3 13:30 zcat + -rwxr-xr-x 1 root root 1678 Mar 3 13:30 zcmp + -rwxr-xr-x 1 root root 5880 Mar 3 13:30 zdiff + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zegrep + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zfgrep + -rwxr-xr-x 1 root root 2081 Mar 3 13:30 zforce + -rwxr-xr-x 1 root root 7585 Mar 3 13:30 zgrep + -rwxr-xr-x 1 root root 2206 Mar 3 13:30 zless + -rwxr-xr-x 1 root root 1842 Mar 3 13:30 zmore + -rwxr-xr-x 1 root root 4553 Mar 3 13:30 znew +I: user script /srv/workspace/pbuilder/26336/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 armhf ruby-rspec-mocks all 3.9.0c2e2m1s3-2 [81.4 kB] Get: 132 http://deb.debian.org/debian bullseye/main armhf ruby-rspec all 3.9.0c2e2m1s3-2 [8348 B] Get: 133 http://deb.debian.org/debian bullseye/main armhf ruby-whitequark-parser all 2.7.1.4-2 [394 kB] -Fetched 42.8 MB in 4s (10.7 MB/s) +Fetched 42.8 MB in 4s (10.5 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 ... 19398 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/d20210824-8053-1xskmto/gemspec +/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20210825-30630-mdrv6c/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/d20210824-8053-1xskmto/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/d20210825-30630-mdrv6c/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 @@ -1005,7 +1040,7 @@ rm -rf extensions cd gems/rubocop-ast-0.3.0 rm -f -chmod 644 lib/rubocop-ast.rb lib/rubocop/ast/sexp.rb lib/rubocop/ast/node_pattern.rb lib/rubocop/ast/version.rb lib/rubocop/ast/builder.rb lib/rubocop/ast/traversal.rb lib/rubocop/ast/processed_source.rb lib/rubocop/ast/node/block_node.rb lib/rubocop/ast/node/break_node.rb lib/rubocop/ast/node/indexasgn_node.rb lib/rubocop/ast/node/case_node.rb lib/rubocop/ast/node/case_match_node.rb lib/rubocop/ast/node/str_node.rb lib/rubocop/ast/node/self_class_node.rb lib/rubocop/ast/node/defined_node.rb lib/rubocop/ast/node/args_node.rb lib/rubocop/ast/node/next_node.rb lib/rubocop/ast/node/for_node.rb lib/rubocop/ast/node/resbody_node.rb lib/rubocop/ast/node/regexp_node.rb lib/rubocop/ast/node/range_node.rb lib/rubocop/ast/node/module_node.rb lib/rubocop/ast/node/or_node.rb lib/rubocop/ast/node/send_node.rb lib/rubocop/ast/node/float_node.rb lib/rubocop/ast/node/array_node.rb lib/rubocop/ast/node/super_node.rb lib/rubocop/ast/node/and_node.rb lib/rubocop/ast/node/keyword_splat_node.rb lib/rubocop/ast/node/yield_node.rb lib/rubocop/ast/node/while_node.rb lib/rubocop/ast/node/symbol_node.rb lib/rubocop/ast/node/def_node.rb lib/rubocop/ast/node/forward_args_node.rb lib/rubocop/ast/node/lambda_node.rb lib/rubocop/ast/node/until_node.rb lib/rubocop/ast/node/mixin/predicate_operator_node.rb lib/rubocop/ast/node/mixin/method_dispatch_node.rb lib/rubocop/ast/node/mixin/hash_element_node.rb lib/rubocop/ast/node/mixin/method_identifier_predicates.rb lib/rubocop/ast/node/mixin/collection_node.rb lib/rubocop/ast/node/mixin/parameterized_node.rb lib/rubocop/ast/node/mixin/basic_literal_node.rb lib/rubocop/ast/node/mixin/modifier_node.rb lib/rubocop/ast/node/mixin/numeric_node.rb lib/rubocop/ast/node/mixin/binary_operator_node.rb lib/rubocop/ast/node/mixin/conditional_node.rb lib/rubocop/ast/node/alias_node.rb lib/rubocop/ast/node/index_node.rb lib/rubocop/ast/node/ensure_node.rb lib/rubocop/ast/node/int_node.rb lib/rubocop/ast/node/if_node.rb lib/rubocop/ast/node/hash_node.rb lib/rubocop/ast/node/when_node.rb lib/rubocop/ast/node/return_node.rb lib/rubocop/ast/node/class_node.rb lib/rubocop/ast/node/pair_node.rb lib/rubocop/ast/node.rb lib/rubocop/ast/ext/range.rb lib/rubocop/ast/token.rb lib/rubocop/ast.rb +chmod 644 lib/rubocop/ast.rb lib/rubocop/ast/builder.rb lib/rubocop/ast/version.rb lib/rubocop/ast/node.rb lib/rubocop/ast/token.rb lib/rubocop/ast/processed_source.rb lib/rubocop/ast/node_pattern.rb lib/rubocop/ast/ext/range.rb lib/rubocop/ast/sexp.rb lib/rubocop/ast/node/indexasgn_node.rb lib/rubocop/ast/node/mixin/collection_node.rb lib/rubocop/ast/node/mixin/binary_operator_node.rb lib/rubocop/ast/node/mixin/method_identifier_predicates.rb lib/rubocop/ast/node/mixin/conditional_node.rb lib/rubocop/ast/node/mixin/numeric_node.rb lib/rubocop/ast/node/mixin/method_dispatch_node.rb lib/rubocop/ast/node/mixin/hash_element_node.rb lib/rubocop/ast/node/mixin/parameterized_node.rb lib/rubocop/ast/node/mixin/predicate_operator_node.rb lib/rubocop/ast/node/mixin/basic_literal_node.rb lib/rubocop/ast/node/mixin/modifier_node.rb lib/rubocop/ast/node/return_node.rb lib/rubocop/ast/node/args_node.rb lib/rubocop/ast/node/hash_node.rb lib/rubocop/ast/node/while_node.rb lib/rubocop/ast/node/break_node.rb lib/rubocop/ast/node/case_match_node.rb lib/rubocop/ast/node/yield_node.rb lib/rubocop/ast/node/range_node.rb lib/rubocop/ast/node/if_node.rb lib/rubocop/ast/node/pair_node.rb lib/rubocop/ast/node/until_node.rb lib/rubocop/ast/node/next_node.rb lib/rubocop/ast/node/when_node.rb lib/rubocop/ast/node/keyword_splat_node.rb lib/rubocop/ast/node/and_node.rb lib/rubocop/ast/node/module_node.rb lib/rubocop/ast/node/int_node.rb lib/rubocop/ast/node/symbol_node.rb lib/rubocop/ast/node/regexp_node.rb lib/rubocop/ast/node/array_node.rb lib/rubocop/ast/node/str_node.rb lib/rubocop/ast/node/super_node.rb lib/rubocop/ast/node/ensure_node.rb lib/rubocop/ast/node/block_node.rb lib/rubocop/ast/node/for_node.rb lib/rubocop/ast/node/defined_node.rb lib/rubocop/ast/node/or_node.rb lib/rubocop/ast/node/lambda_node.rb lib/rubocop/ast/node/index_node.rb lib/rubocop/ast/node/case_node.rb lib/rubocop/ast/node/float_node.rb lib/rubocop/ast/node/class_node.rb lib/rubocop/ast/node/def_node.rb lib/rubocop/ast/node/send_node.rb lib/rubocop/ast/node/alias_node.rb lib/rubocop/ast/node/self_class_node.rb lib/rubocop/ast/node/resbody_node.rb lib/rubocop/ast/node/forward_args_node.rb lib/rubocop/ast/traversal.rb lib/rubocop-ast.rb find lib/ -type d -empty -delete cd - cd - @@ -1028,461 +1063,2259 @@ 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 36650 +Randomized with seed 29656 -RuboCop::AST::OrNode - #alternate_operator - with a semantic or node - is expected to eq "||" - with a logical or node - is expected to eq "or" - #operator - with a logical or node - is expected to eq "||" - with a semantic or node - is expected to eq "or" - #rhs - with a logical or node - is expected to equal true - with a semantic 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 "&&" +RuboCop::AST::StrNode .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 + with a normal string is expected to equal true - #lhs - with a logical or node + with a heredoc is expected to equal true - with a semantic or node + with a string with interpolation is expected to equal true - #logical_operator? - with a semantic or node + #heredoc? + with a string with interpolation is expected to equal false - with a logical or node + with a normal string + is expected to equal false + with a heredoc is expected to equal true RuboCop::AST::BreakNode behaves like wrapped arguments node + #arguments + with no arguments and braces + is expected to equal true + with a single splat argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + with no arguments + is expected to equal true + with a single argument and braces + is expected to eq 1 + with a single argument + is expected to eq 1 .new with arguments is expected to equal true without arguments is expected to equal true + +RuboCop::AST::YieldNode + #command? + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #operator_method? + is expected to be falsey + #block_argument? + is expected to be falsey + #const_receiver? + is expected to be falsey + #camel_case_method? + is expected to be falsey + #predicate_method? + is expected to be falsey + #implicit_call? + is expected to be falsey + #arguments? + with multiple literal 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 a single literal argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + #last_argument + with multiple mixed arguments + is expected to equal true + with multiple literal 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 + #first_argument + with no arguments + is expected to equal true + with multiple literal arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true + with a single splat argument + is expected to equal true + with a single literal argument + 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 string + is expected to be truthy + when argument is a symbol + is expected to be truthy + #double_colon? + is expected to be falsey + #assignment_method? + is expected to be falsey + #dot? + is expected to be falsey + #comparison_method? + is expected to be falsey + #receiver + is expected to equal true + .new + is expected to equal true + #splat_argument? + with a splat argument + is expected to be truthy + with regular arguments + is expected to be falsey + with no arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + #block_literal? + is expected to be falsey + #setter_method? + is expected to be falsey + #bang_method? + is expected to be falsey + #macro? + is expected to be falsey + #arguments + 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 + with no arguments + is expected to equal true + #self_receiver? + is expected to be falsey + #method_name + is expected to eq :yield + #parenthesized? + with arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + with no arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #block_node + is expected to equal true + +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::ClassNode + #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 + .new + 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 + +RuboCop::AST::SuperNode + #implicit_call? + is expected to be falsey + #arguments + with multiple mixed arguments + is expected to eq 2 + with a single literal argument + is expected to eq 1 + with no arguments + is expected to equal true + with multiple literal arguments + is expected to eq 2 + with a single splat argument + is expected to eq 1 + #camel_case_method? + is expected to be falsey + #comparison_method? + is expected to be falsey + #last_argument + 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 a single literal argument + is expected to equal true + with multiple literal arguments + is expected to equal true + #self_receiver? + is expected to be falsey + #method_name + is expected to eq :super + #dot? + 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_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 + #assignment_method? + is expected to be falsey + #setter_method? + is expected to be falsey + #predicate_method? + is expected to be falsey + #method? + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey + #block_literal? + with no block + is expected to be falsey + with a block literal + is expected to be truthy + with a block argument + is expected to be falsey + #block_argument? + with regular arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + with no arguments + is expected to be falsey + with a block argument + is expected to be truthy + #arguments? + with a single splat argument + is expected to be truthy + with multiple literal arguments + is expected to be truthy + with no arguments + is expected to be falsey + with a single literal argument + is expected to be truthy + with multiple mixed arguments + is expected to be truthy + #const_receiver? + is expected to be falsey + .new + with a super node + is expected to equal true + with a zsuper node + is expected to equal true + #command? + when argument is a symbol + is expected to be truthy + when argument is a string + is expected to be truthy + #double_colon? + is expected to be falsey + #receiver + 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 not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #first_argument + with multiple literal arguments + is expected to equal true + with multiple mixed arguments + is expected to equal true + with no arguments + is expected to equal true + with a single splat argument + is expected to equal true + with a single literal argument + is expected to equal true + #bang_method? + is expected to be falsey + #operator_method? + is expected to be falsey + #macro? + is expected to be falsey + +RuboCop::AST::RangeNode + .new + 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 + with a beignless range + is expected to equal true + is expected to equal true + with an exclusive range + is expected to equal true + is expected to equal true + +RuboCop::AST::Token + #column + returns index of first char in token range on that line + #to_s + returns string of token data + #space_before + returns truthy MatchData when there is a space before token + returns nil when it is on the first line + returns nil when there is not a space before token + type predicates + #left_array_bracket? + returns true for left_array_bracket tokens + returns false for non left_array_bracket tokens + with braces & parens + #right_parens? + returns true for right parens tokens + returns false for non right parens tokens + #right_curly_brace? + returns true for all right brace tokens + returns false for non right brace tokens + #left_brace? + returns false for non left hash brace tokens + returns true for left hash brace tokens + #left_parens? + returns false for non left parens tokens + returns true for left parens tokens + #left_curly_brace? + returns true for left block brace tokens + returns false for non left block brace tokens + #semicolon? + returns false for non semicolon tokens + returns true for semicolon tokens + #comment? + returns true for comment tokens + returns false for non comment tokens + #left_ref_bracket? + returns false for non left_ref_bracket tokens + returns true for left_ref_bracket tokens + #end? + returns false for non end tokens + returns true for end tokens + #left_brace? + returns true for right_bracket tokens + returns false for non right_bracket tokens + #left_bracket? + returns false for non left_bracket tokens + returns true for all left_bracket tokens + #equals_sign? + returns true for equals sign tokens + returns false for non equals sign tokens + #right_bracket? + returns true for all right_bracket tokens + returns false for non right_bracket tokens + #comma? + returns true for comma tokens + returns false for non comma tokens + #rescue_modifier? + returns true for rescue modifier tokens + returns false for non rescue modifier tokens + .from_parser_token + sets parser token's text to rubocop token's text + sets parser token's type to rubocop token's type + returns a #to_s useful for debugging + sets parser token's range to rubocop token's pos + #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 + #line + returns line of token + #space_after + returns nil when there is not a space after token + returns truthy MatchData when there is a space after token + +RuboCop::AST::ForwardArgsNode + when using Ruby 2.7 or newer + #to_a + is expected to contain exactly (be forward arg type) + +RuboCop::AST::ReturnNode + behaves like wrapped arguments node #arguments - with a single splat argument - is expected to eq 1 with no arguments and braces is expected to equal true - with a single argument - is expected to eq 1 with no arguments is expected to equal true + with a single argument and braces + is expected to eq 1 + with a single argument + is expected to eq 1 with multiple literal arguments is expected to eq 2 - with a single argument and braces + with a single splat argument is expected to eq 1 + .new + without arguments + is expected to equal true + with arguments + is expected to equal true -RuboCop::AST::RangeNode +RuboCop::AST::SendNode + #binary_operation?? + with a unary operation + is expected to equal false + with a regular method call + is expected to equal false + with an implicit call method + is expected to equal false + with a binary operation + is expected to equal true + #method_name + with a plain method + is expected to eq :bar + with an operator method + is expected to eq :== + with a setter method + is expected to eq :bar= + with an implicit call method + is expected to eq :call + #nonmutating_array_method? + with a mutating Array method + is expected to be falsey + with a nonmutating Array method + is expected to be truthy + with a regular method + is expected to be falsey + #last_argument + 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 + with a single literal argument + is expected to equal true + #block_literal? + with a block literal + is expected to be truthy + with no block + is expected to be falsey + with a block argument + is expected to be falsey + #assignment_method? + with a regular method + is expected to be falsey + with an assignment method + is expected to be truthy + with a comparison method + is expected to be falsey + with a bracket assignment method + is expected to be truthy + #block_node + with no block + is expected to equal true + with a block literal + is expected to equal true + with a block argument + is expected to equal true + #arithmetic_operation? + with a regular method call + is expected to be falsey + with a binary arithmetic operation + is expected to be truthy + with a unary numeric operation + is expected to be falsey + #enumerable_method? + with an enumerable method + is expected to be truthy + with a regular method + is expected to be falsey + #nonmutating_operator_method? + with a nonmutating binary operator method + is expected to be truthy + with a mutating binary operator method + is expected to be falsey + with a nonmutating unary operator method + is expected to be truthy + with a regular method + is expected to be falsey + #receiver + with a variable receiver + is expected to equal true + with a literal receiver + is expected to equal true + with no receiver + is expected to equal true + #nonmutating_binary_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 + #const_receiver? + with a non-constant receiver + is expected to be falsey + with a self receiver + is expected to be falsey + with a constant receiver + is expected to be truthy + #lambda? + with a non-lambda method + is expected to be falsey + with a method named lambda in a class + is expected to be falsey + with a stabby lambda method + is expected to be truthy + with a lambda method + is expected to be truthy + #double_colon? + without a dot + is expected to be falsey + with a dot + is expected to be falsey + with a unary method + is expected to be falsey + with a double colon + is expected to be truthy + #implicit_call? + with an implicit call method + is expected to be truthy + with an explicit call method + is expected to be falsey + with a regular method + is expected to be falsey + #operator_method? + 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 + with a regular method + is expected to be falsey + #nonmutating_unary_operator_method? + with a nonmutating unary operator method + is expected to be truthy + with a regular method + is expected to be falsey + #non_bare_access_modifier? + when node is a non-bare `module_function` + is expected to be truthy + when node is a non-bare `public` + is expected to be truthy + when node does not have an argument + is expected to be falsey + when node is not an access modifier + is expected to be falsey + when node is a non-bare `protected` + is expected to be truthy + when node is a non-bare `private` + is expected to be truthy + #parenthesized? + with arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + with no arguments + when not using parentheses + is expected to be falsey + when using parentheses + is expected to be truthy + #comparison_method? + with a negation method + is expected to be falsey + with a comparison method + is expected to be truthy + with a regular method + is expected to be falsey + #nonmutating_hash_method? + with a regular method + is expected to be falsey + with a mutating Hash method + is expected to be falsey + with a nonmutating Hash method + is expected to be truthy + #lambda_literal? + with a lambda method + is expected to equal false + with a stabby lambda + is expected to equal true + with `a.() {}` style method + is expected to be falsey + with a non-lambda method + is expected to be falsey .new - with a beignless range + with a safe navigation method send is expected to equal true + with a regular method send is expected to equal true - with an infinite range + #block_argument? + with no arguments + is expected to be falsey + with a block argument + is expected to be truthy + with regular arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + #arguments? + with a single splat argument + is expected to be truthy + with multiple literal arguments + is expected to be truthy + with no arguments + is expected to be falsey + with multiple mixed arguments + is expected to be truthy + with a single literal argument + is expected to be truthy + #macro? + without a receiver + when parent is a class constructor + is expected to be truthy + when parent is a block + is expected to be truthy + when parent is a class + is expected to be truthy + when parent is a singleton class + is expected to be truthy + when parent is a begin without a parent + 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 keyword begin inside of an class + is expected to be truthy + without a parent + is expected to be truthy + with a receiver + when parent is a module + is expected to be falsey + when parent is a class + is expected to be falsey + #camel_case_method? + with a regular method + is expected to be falsey + with a camel case method + 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 + is expected to be truthy + #predicate_method? + with a bang method + is expected to be falsey + with a predicate method + is expected to be truthy + with a regular method + is expected to be falsey + #first_argument + with a single splat argument is expected to equal true + with no arguments is expected to equal true - with an inclusive range + with a single literal argument is expected to equal true + with multiple mixed arguments is expected to equal true - with an exclusive range + with multiple literal arguments + is expected to equal true + #setter_method? + with a setter method + is expected to be truthy + with an indexed setter method + is expected to be truthy + with an operator method + is expected to be falsey + with a regular method + is expected to be falsey + #negation_method? + with prefix bang + is expected to be truthy + with suffix `not` + is expected to be falsey + with a non-negated method + is expected to be falsey + with prefix `not` + is expected to be truthy + #prefix_bang? + with a non-negated method + is expected to be falsey + with keyword `not` + is expected to be falsey + with a bang method + is expected to be truthy + #arguments + with multiple mixed arguments + is expected to eq 2 + with a single literal argument + is expected to eq 1 + with no arguments + is expected to equal true + with a single splat argument + is expected to eq 1 + with multiple literal arguments + is expected to eq 2 + #self_receiver? + with a non-self receiver + is expected to be falsey + with an implicit receiver + is expected to be falsey + with a self receiver + is expected to be truthy + #def_modifier? + with a prefixed def modifier + is expected to be truthy + with several prefixed def modifiers + is expected to be truthy + #dot? + without a dot + is expected to be falsey + with a double colon + is expected to be falsey + with a dot + is expected to be truthy + with a unary method + is expected to be falsey + #access_modifier? + when node is a bare `module_function` + is expected to be truthy + when node is a bare `protected` + is expected to be truthy + when node is a bare `public` + is expected to be truthy + when node is not an access modifier + is expected to be falsey + when node is a non-bare `protected` + is expected to be truthy + when node is a non-bare `private` + is expected to be truthy + when node is a non-bare `public` + is expected to be truthy + when node is a non-bare `module_function` + is expected to be truthy + when node is a bare `private` + is expected to be truthy + #method? + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey + #loop_keyword? + is expected to equal false + #post_condition_loop? + is expected to equal false + #bare_access_modifier? + when node is a bare `module_function` + is expected to be truthy + when node is a bare `public` + is expected to be truthy + when node is not an access modifier + is expected to be falsey + when node is a bare `protected` + is expected to be truthy + when node is a bare `private` + is expected to be truthy + when node has an argument + 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 + #splat_argument? + with no arguments + is expected to be falsey + with regular arguments + is expected to be falsey + with mixed arguments + is expected to be truthy + with a splat argument + is expected to be truthy + #unary_operation? + with a regular method call + is expected to equal false + with an implicit call method + is expected to equal false + with a binary operation + is expected to equal false + with a unary operation + is expected to equal true + #prefix_not? + with a non-negated method + is expected to be falsey + with keyword `not` + is expected to be truthy + with a bang method + is expected to be falsey + #nonmutating_string_method? + with a regular method + is expected to be falsey + with a mutating String method + is expected to be falsey + with a nonmutating String method + is expected to be truthy + #command? + when argument is a string + with an implicit receiver + is expected to be truthy + with an explicit receiver + is expected to be falsey + when argument is a symbol + with an implicit receiver + is expected to be truthy + with an explicit receiver + is expected to be falsey + +RuboCop::AST::WhenNode + #conditions + with a multiple conditions + is expected to eq 3 + is expected to all be literal + with a single condition + is expected to all be literal + is expected to eq 1 + #body + without a then keyword + is expected to equal true + with 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 + #branch_index + is expected to eq 2 + is expected to eq 1 + is expected to eq 0 + .new + is expected to equal true + #then? + without a then keyword + is expected to be falsey + with a then keyword + is expected to be truthy + +RuboCop::AST::Node + #argument_type? + method arguments + returns true for all argument types + block arguments + returns true for all argument types + #recursive_basic_literal? + 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 `"#{2}"` + behaves like literal + returns true for `%r{abx}ixo` + behaves like non literal + returns false for `{ :sym => some_method_call }` + behaves like literal + returns true for `1` + behaves like literal + returns true for `{ :a => 1, :b => 2 }` + behaves like literal + returns true for `false` + behaves like literal + returns true for `(false && true)` + behaves like non literal + returns false for `(x && false)` + behaves like non literal + returns false for `some_method_call` + behaves like literal + returns true for `!true` + behaves like non literal + returns false for `%r{abx#{foo}}ixo` + behaves like literal + returns true for `/./` + behaves like literal + returns true for `(false <=> true)` + behaves like literal + returns true for `'str'` + behaves like literal + returns true for `(1)` + behaves like non literal + returns false for `/.#{some_method_call}/` + behaves like literal + returns true for `[1, 2, 3]` + behaves like literal + returns true for `1.0` + behaves like literal + returns true for `{ a: 1, b: 2 }` + behaves like non literal + returns false for `(x or false)` + behaves like literal + returns true for `nil` + behaves like non literal + returns false for `{ some_method_call => :sym }` + behaves like literal + returns true for `(false or true)` + behaves like non literal + returns false for `[some_method_call]` + #value_used? + within a module definition node + is always true + at the top level + is false + within a singleton class node + is always true + within a while node + is true only for the condition + within a method call node + is always true + within an array literal + at the top level + is always false + assigned to an ivar + is always true + 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 class definition node + is always true + #pure? + for a gvar assignment + returns false + for a cvar assignment + returns false + for an array literal + with only literal children + returns true + which contains a method call + returns false + for a hash literal + with only literal children + returns true + which contains a method call + returns false + for a method call + returns false + for a class definition + returns false + for a regexp + with interpolated segments + returns false + with options + returns true + with no interpolation + returns true + for an integer literal + returns true + for a module definition + returns false + for an lvar assignment + returns false + for a nested if + where the innermost descendants are local vars and literals + returns true + where one branch contains an assignment statement + returns false + where one branch contains a method call + returns false + for an ivar assignment + returns false + #struct_constructor? + struct definition with a block + matches + struct definition without block + does not match + ::Struct + matches + #module_definition? + nested modules + matches + with ::ModuleName + matches + included module definition + matches + namespaced modules + matches + with Module.new + matches + prepend Module.new + matches + using module keyword + matches + #class_constructor? + class definition with a block + matches + module definition with a block + matches + class definition on outer scope + matches + class definition + does not match + #sibling_index + returns its sibling index + #class_definition? + without inheritance + matches + namespaced class + matches + with Class.new + matches + with self singleton class + matches + constant defined as Struct without block + does not match + with object singleton class + matches + with Struct + matches + with inheritance + matches + with ::ClassName + matches + +RuboCop::AST::WhileNode + #keyword + is expected to eq "while" + #do? + without a do keyword + is expected to be falsey + with a do keyword + is expected to be truthy + #loop_keyword? + with a statement while + is expected to be truthy + with a modifier while + is expected to be truthy + .new + with a statement while + is expected to equal true + with a modifier while + is expected to equal true + #inverse_keyword + is expected to eq "until" + #post_condition_loop? + with a statement while + is expected to be falsey + with a modifier while + is expected to be truthy + +RuboCop::AST::IntNode + #value + is expected to eq 10 + #sign? + explicit negative int + is expected to be truthy + explicit positive int + is expected to be truthy + .new + is expected to be truthy + +RuboCop::AST::Ext::Range + #line_span + accepts an `exclude_end` keyword argument + returns the range of lines a range occupies + +RuboCop::AST::ForNode + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #post_condition_loop? + is expected to be falsey + .new + is expected to equal true + #body + is expected to equal true + #collection + is expected to equal true + #variable + is expected to equal true + #keyword + is expected to eq "for" + #loop_keyword? + is expected to be truthy + #void_context? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be truthy + +RuboCop::AST::KeywordSplatNode + #key_delta + with alignment set to :right + when using colon delimiters + when keyword splat is aligned + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when keyword splat is on the same line + is expected to eq 0 + when 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 ahead + 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 + with alignment set to :left + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is aligned + is expected to eq 0 + when keyword splat is behind + is expected to eq -2 + when keyword splat is ahead + is expected to eq 2 + when using hash rocket 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 + #key + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + #operator + is expected to eq "**" + #value_delta + when using colon delimiters + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when using hash rocket delimiters + when keyword splat is left aligned + is expected to eq 0 + when keyword splat is on the same line + is expected to eq 0 + when keyword splat is behind + is expected to eq 0 + when keyword splat is ahead + is expected to eq 0 + #value + is expected to eq s(:kwsplat, + s(:send, nil, :foo)) + .new + is expected to equal true + #colon? + is expected to be falsey + #same_line? + when both pairs are on the same line + is expected to be truthy + when pairs are on separate lines + is expected to be falsey + when a multiline pair shares the same line + is expected to be truthy + is expected to be truthy + #hash_rocket? + is expected to be falsey + +RuboCop::AST::UntilNode + #do? + with a do keyword + is expected to be truthy + without a do keyword + is expected to be falsey + #inverse_keyword + is expected to eq "while" + #loop_keyword? + with a statement until + is expected to be truthy + with a modifier until + is expected to be truthy + .new + with a modifier until + is expected to equal true + with a statement until + is expected to equal true + #keyword + is expected to eq "until" + #post_condition_loop? + with a statement until + is expected to be falsey + with a modifier until + is expected to be truthy + +RuboCop::AST::CaseMatchNode + when using Ruby 2.7 or newer + .new + is expected to equal true + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal false + #else_branch + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal true + #keyword + is expected to eq "case" + #in_pattern_branches + is expected to all be in pattern type + is expected to eq 3 + #each_in_pattern + when passed a block + yields all the conditions + when not passed a block + is expected to equal true + +RuboCop::AST::ArrayNode + #values + with an array of variables + is expected to eq 2 + is expected to all be send type + with an empty array + is expected to equal true + with an array of literals + is expected to eq 3 + is expected to all be literal + #percent_literal? + with a string percent literal + is expected to be truthy + is expected to be falsey + is expected to be truthy + with square brackets + is expected to be falsey + is expected to be falsey + is expected to be falsey + with a symbol percent literal + is expected to be truthy + is expected to be falsey + is expected to be truthy + #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 + with a percent literal + is expected to equal true + unbracketed + is expected to equal nil + #square_brackets? + with a percent literal + is expected to be falsey + with square brackets + is expected to be truthy + +RuboCop::AST::LambdaNode + #receiver + is expected to eq nil + #method_name + is expected to eq :lambda + #arguments + is expected to eq 2 + +RuboCop::AST::RegexpNode + #extended? + with other options + is expected to equal false + with no options + is expected to equal false + with x and other options + is expected to equal true + with only x option + is expected to equal 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 multi-line %r{-delimiters + is expected to eq false + with %r/-delimiters + is expected to eq false + #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 + #regopt + 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 without option + is expected to equal true + is expected to equal true + with an empty regexp + is expected to equal true + is expected to equal true + 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 + #ignore_case? + with no options + is expected to equal false + with i and other options + is expected to equal true + with other options + is expected to equal false + with only i option + is expected to equal true + #no_encoding? + with other options + is expected to equal false + with only n option + is expected to equal true + with no options + is expected to equal false + with n and other options + is expected to equal true + #to_regexp + with a multi-line regexp with option + is expected to eq / +.+ +/ix + with a regexp with option + is expected to eq /.+/mix + with an empty regexp with option + is expected to eq //ix + with a regexp with an "o" option + is expected to eq "/abc/i" + with an empty regexp + is expected to eq // + with a multi-line regexp without option + is expected to eq / +.+ +/ + with a regexp without option + is expected to eq /.+/ + .new + is expected to equal true + #single_interpolation? + with no options + is expected to equal false + with o and other options + is expected to equal true + with only o option + is expected to equal true + with other options + is expected to equal false + #interpolation? + with no interpolation returns false + is expected to eq false + with regexp quote + is expected to eq true + with direct variable interpoation + is expected to eq true + #content + with an empty regexp + is expected to eq "" + with an empty regexp with option + is expected to eq "" + with a multi-line regexp without option + is expected to eq "\n.+\n" + with a regexp with option + is expected to eq ".+" + with a multi-line regexp with option + is expected to eq "\n.+\n" + with a regexp without option + is expected to eq ".+" + #delimiters + with %r{-delimiters + is expected to eq ["{", "}"] + 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 ["/", "/"] + #delimiter? + with %r/-delimiters + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq true + is expected to eq false + is expected to eq false + with %r<-delimiters + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq true + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq true + with /-delimiters + is expected to eq true + is expected to eq false + with %r{-delimiters + is expected to eq true + is expected to eq true + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + is expected to eq false + with multi-line %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 + #multiline_mode? + with m and other options + is expected to equal true + with only m option + is expected to equal true + with no options + is expected to equal false + with other options + is expected to equal false + +RuboCop::AST::ModuleNode + .new + is expected to equal true + #identifier + is expected to equal true + #body + with a multi-expression body + is expected to equal true + with an empty body + is expected to equal nil + with a single expression body + is expected to equal true + +RuboCop::AST::IfNode + #keyword + with a ternary operator + is expected to eq "" + with an unless statement + is expected to eq "unless" + with an if statement + is expected to eq "if" + #nested_conditional? + with no nested conditionals + is expected to be falsey + with nested conditionals in if clause + is expected to be truthy + with nested conditionals in else clause + is expected to be truthy + with nested conditionals in elsif clause + is expected to be truthy + 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 + #if? + with an if statement + is expected to be truthy + with a ternary operator + is expected to be falsey + with an unless 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 + #ternary? + with a ternary operator + is expected to be truthy + with an if statement + is expected to be falsey + with an unless 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 + #elsif? + with an elsif statement + is expected to be truthy + without an elsif statement + is expected to be falsey + with an if statement comtaining an elsif + is expected to be falsey + #unless? + with an if statement + is expected to be falsey + with a ternary operator + is expected to be falsey + with an unless statement + is expected to be truthy + #if_branch + with a ternary operator + is expected to equal true + with an unless statement + is expected to equal true + with an if statement + is expected to equal true + #branches + with an if statement + is expected to eq 1 + is expected to all be literal + with an elsif statement + is expected to eq 3 + is expected to all be literal + with an else statement + is expected to all be literal + is expected to eq 2 + with an unless statement + is expected to eq 1 + is expected to all be literal + .new + with a ternary operator + is expected to equal true + with a modifier statement + is expected to equal true + with a regular if statement + is expected to equal true + #modifier_form? + with a non-modifier if 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 + with a modifier unless statement + is expected to be truthy + with a non-modifier unless statement + is expected to be falsey + #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" + #elsif_conditional? + with nested conditionals in if clause + is expected to be falsey + with multiple elsif conditionals + is expected to be truthy + with one elsif conditional + is expected to be truthy + with nested conditionals in else clause + 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 + #else? + with an elsif statement + is expected to be truthy + without an else statement + is expected to be falsey + +RuboCop::AST::DefinedNode + #method_name + is expected to eq :defined? + #arguments + is expected to eq 1 + is expected to all be sym type + .new + with a defined? node + is expected to equal true + #receiver + is expected to eq nil + +RuboCop::AST::ArgsNode + .new + with a method definition + is expected to equal true + with a lambda literal + is expected to equal true + with a block + is expected to equal true + #empty_and_without_delimiters? + with arguments + with a method definition + is expected to equal false + with a lambda literal + is expected to equal false + with delimiters + with a lambda literal + is expected to equal false + with a method definition + is expected to equal false + with a block + is expected to equal false + with empty arguments + 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 + +RuboCop::AST::ProcessedSource + #[] + when an index is passed + returns the line + when a range is passed + returns the array of lines + when start index and length are passed + returns the array of lines + #path + is the path passed to .new + valid_syntax? + when the source is valid but has some warning diagnostics + returns true + when the source could not be parsed due to encoding error + returns false + when the source is invalid + returns false + when a line starts with an integer literal + tokenizes the source correctly + when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI + returns true + when the source is completely valid + returns true + #preceding_line + returns source of line before token + #file_path + returns file path + .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 + #tokens + has an array of tokens + #comments + is an array of comments + when the source is invalid + returns [] + #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 + #parser_error + when the source could not be parsed due to encoding error + returns the error + when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII + is nil + when the source was properly parsed + is nil + with heavily commented source + #each_comment_in_lines + yields the comments + #comments_before_line + returns comments on or before given line + #contains_comment? + provided a multiline source_range with at least one line with comment + is expected to equal true + provided source_range on line without comment + is expected to equal false + provided source_range on comment line + is expected to equal true + provided source_range on line with comment + is expected to equal true + #line_with_comment? + returns true for lines with comments + returns false for lines without comments + #comment_at_line + returns nil if line has no comment + returns the comment at the given line number + #find_comment + yields nil when there is no match + yields correct comment + #each_comment + yields all comments + #buffer + is a source buffer + #start_with? + with present source + returns true when passed string that starts source + returns false when passed string that does not start source + with blank source + returns false + token enumerables + #find_token + yields nil when there is no match + yields correct token + #each_token + yields all tokens + #blank? + with source with content + returns false + with source of no content + returns true + #ast + is the root node of AST + +RuboCop::AST::BlockNode + #closing_delimiter + when enclosed in do-end keywords + is expected to eq "end" + when enclosed in braces + is expected to eq "}" + #keywords? + when enclosed in do-end keywords + is expected to be truthy + when enclosed in braces + is expected to be falsey + .new + is expected to equal true + #arguments + with a single literal argument + is expected to eq 1 + >= Ruby 2.7 + using numbered parameters + is expected to equal true + with multiple mixed arguments + is expected to eq 2 + with no arguments + is expected to equal true + with a single splat argument + is expected to eq 1 + #lambda? + when block belongs to a stabby lambda + is expected to be truthy + when block belongs to a method lambda + is expected to be truthy + when block belongs to a non-lambda method + is expected to be falsey + #multiline? + when block is on several lines + is expected to be truthy + when block is on a single line + is expected to be falsey + #void_context? + when block method is not each + is expected to be falsey + when block method is each + is expected to be truthy + when block method is tap + is expected to be truthy + #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 + when enclosed in braces + is expected to eq "{" + when enclosed in do-end keywords + is expected to eq "do" + #delimiters + when enclosed in do-end keywords + is expected to eq ["do", "end"] + when enclosed in braces + is expected to eq ["{", "}"] + #braces? + when enclosed in braces + is expected to be truthy + when enclosed in do-end keywords + is expected to be falsey + #arguments? + with multiple mixed arguments + is expected to be truthy + >= Ruby 2.7 + using numbered parameters + is expected to equal false + with a single splat argument + is expected to be truthy + with a single argument + is expected to be truthy + with no arguments + is expected to be falsey + +RuboCop::AST::EnsureNode + #body + is expected to equal true + .new + is expected to equal true + +RuboCop::AST::AndNode + #alternate_operator + with a logical and node + is expected to eq "and" + with a semantic and node + is expected to eq "&&" + #semantic_operator? + with a logical and node + is expected to equal false + with a semantic and node + 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" + #lhs + with a semantic and node is expected to equal true + with a logical and node + is expected to equal true + #rhs + with a semantic and node + is expected to equal true + with a logical and node + is expected to equal true + #logical_operator? + with a semantic and node + is expected to equal false + with a logical and node + is expected to equal true + .new + with a logical and node + is expected to equal true + with a semantic and node + is expected to equal true + #operator + with a semantic and node + is expected to eq "and" + with a logical and node + is expected to eq "&&" + +RuboCop::AST::AliasNode + .new + is expected to equal true + #old_identifier + is expected to equal true + is expected to eq :bar + #new_identifier + is expected to equal true + is expected to eq :foo + +RuboCop::AST::SymbolNode + #value + is expected to eq :foo + .new + with a symbol node is expected to equal true RuboCop::AST::NodePattern - captures within union - 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 - with a different number of captures in each branch - behaves like invalid - is invalid - on simple subpatterns - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - 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 - simple sequence - on a node with a different type - behaves like nonmatching - doesn't match - on a node with too many children - behaves like nonmatching - doesn't match - with a nested sequence in head position - behaves like invalid - is invalid - on a node with the same type and matching children + unions + nested inside a sequence behaves like matching matches - with a nested sequence in non-head position + with a nested sequence behaves like matching matches - on a node with the same type and non-matching children - with non-matching selector - behaves like nonmatching - doesn't match - with non-matching receiver type - behaves like nonmatching - doesn't match - sequence with trailing ... - on a node with fewer children, with a wildcard preceding - behaves like nonmatching - doesn't match - on a node with the same type and fewer children - behaves like nonmatching - doesn't match - on a node with the same type and more children - with 2 children more - behaves like matching - matches - with 1 child more + at the top level + containing string literals behaves like matching matches - on a node with non-matching children - behaves like nonmatching - doesn't match - on a node with a different type - behaves like nonmatching - doesn't match - on a node with the same type and exact number of children - behaves like matching - matches - descend - without match - behaves like nonmatching - doesn't match - nested - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with a match multiple levels, depth first - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with a literal match - behaves like matching - matches - 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 - predicates - 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 an expression argument - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true + containing mixed node and literals behaves like matching matches - when negated - behaves like matching - matches - with a named argument - for which the predicate is true + 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 multiple [] + 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 + on a node which meets some requirements but not all + behaves like nonmatching + doesn't match + containing integer literals behaves like matching matches - for which the predicate is false - behaves like nonmatching - doesn't match - when not given - raises an error - with extra arguments - raises an error - applied to an integer for which the predicate is false + comments + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + bad syntax + with unmatched opening curly + behaves like invalid + is invalid + with negated closing curly + behaves like invalid + is invalid + with unmatched closing curly + behaves like invalid + is invalid + with unmatched closing paren + behaves like invalid + is invalid + with empty parentheses + behaves like invalid + is invalid + with negated ellipsis + behaves like invalid + is invalid + with doubled comma in arg list + behaves like invalid + is invalid + with negated closing paren + behaves like invalid + is invalid + with empty intersection + behaves like invalid + is invalid + with unmatched opening paren and `...` + behaves like invalid + is invalid + with doubled ellipsis + behaves like invalid + is invalid + with empty union + behaves like invalid + is invalid + with leading comma in arg list + behaves like invalid + is invalid + with unmatched opening paren + behaves like invalid + is invalid + params + when negated, with a matching value behaves like nonmatching doesn't match - applied to an integer for which the predicate is true + when inside a union, with a matching value behaves like matching matches - with one extra argument - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true - behaves like matching - matches - with a constant argument - for which the predicate is true - behaves like matching - matches - for which the predicate is false - behaves like nonmatching - doesn't match - at head position of a sequence + when inside an intersection behaves like matching matches - with multiple arguments - for which the predicate is false - behaves like nonmatching - doesn't match - for which the predicate is true - behaves like matching - matches - when in last-child position, but all children have already been matched + when inside a union, with a nonmatching value behaves like nonmatching doesn't match + as named parameters + when not provided + raises an ArgumentError + when extra are provided + raises an ArgumentError + when provided as argument to match + behaves like matching + matches in root position - with name containing a numeral + in root position behaves like matching matches behaves like matching matches - repeated - using + - with zero match - behaves like nonmatching - doesn't match - with matching children - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - behaves like repeated pattern - 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 - at beginning of sequence - behaves like invalid - is invalid - using ? - behaves like repeated pattern - with an ellipsis in the same sequence - behaves like invalid - is invalid - with one match - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - at beginning of sequence - behaves like invalid - is invalid - with too many matching children - behaves like nonmatching - doesn't match - 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 - using * - without capture + param number zero + in a position which matches original target node behaves like matching matches - with matching children - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with 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 - behaves like repeated pattern - at beginning of sequence - behaves like invalid - is invalid - with an ellipsis in the same sequence - behaves like invalid - is invalid - with one match - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with 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 - with no match + in a position which does not match original target node behaves like nonmatching doesn't match - nested 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 - literals - symbol literals + when preceded by ... behaves like matching matches - bare literal - on a matching literal - behaves like matching - matches - on a node - behaves like nonmatching - doesn't match - negative integer literals + 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 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 + in a nested sequence behaves like matching matches - single quoted string literals + without explicit number behaves like matching matches - negative float literals + when negated, with a nonmatching value behaves like matching matches - double quoted string literals + bare node type + on a node with a matching, hyphenated type behaves like matching matches - positive float literals + #to_s + is instructive + marshal compatibility behaves like matching matches - nil - against a node pattern (bug #5470) - behaves like nonmatching - doesn't match - nil value in AST, use nil? method + #dup behaves like matching matches - nil literals + on a node with the same type behaves like matching matches - nil value in AST + #pattern + returns the pattern + #== + returns true iff the patterns are similar + yaml compatibility + behaves like matching + matches + on a node with a different type behaves like nonmatching doesn't match - captures on ... - 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 - with a remaining literal at the end + descend + with a match multiple levels, depth first behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block - with no remaining pattern at the end + 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 - at the very beginning of a sequence + with a literal match + behaves like matching + matches + without match + behaves like nonmatching + doesn't match + 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 - with a remaining capture at the end - behaves like multiple capture yields captured value(s) and returns true if there is a block - returns captured values if there is no block - 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 remaining patterns at the end + 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 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 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 fewer children, with a wildcard preceding + behaves like nonmatching + doesn't match + captures within union + with a different number of captures in each branch + behaves like invalid + is invalid + 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 - with a remaining node type at the end - behaves like single capture + 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 - after a child - behaves like single capture - yields captured value(s) and returns true if there is a block + with complex nesting + behaves like multiple capture returns captured values if there is no block - with a remaining [] at the end - behaves like single capture yields captured value(s) and returns true if there is a block - returns captured values if there is no block - with a remaining sequence at the end + ellipsis + with a nested sequence at the end, but no remaining child + behaves like nonmatching + doesn't match + 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 - commas - with commas randomly strewn around - behaves like invalid - is invalid - bare node type - yaml compatibility + yields captured value(s) and returns true if there is a block + at the very beginning of a sequence behaves like matching matches - 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 - #pattern - returns the pattern - on a node with the same type - behaves like matching - matches - marshal compatibility - behaves like matching - matches - on a node with a matching, hyphenated type - behaves like matching - matches - #== - returns true iff the patterns are similar - #to_s - is instructive - #dup - behaves like matching - matches - funcalls - with multiple arguments - behaves like matching - matches - with one argument - behaves like matching - matches - without extra arguments - behaves like matching - matches - node type - in seq head - on a child with a different type + 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 + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + negation + when nested in complex ways + with (send str :+ (send str :to_i)) + behaves like matching + matches + with (send str :<< str) behaves like nonmatching doesn't match - on a node with the same type + with (send int :- int) behaves like matching matches - for a child - on a child with the same type + on a symbol + with a non-matching symbol behaves like matching matches - on a child with a different type + with a matching symbol behaves like nonmatching doesn't match - on a child litteral + with a non-matching symbol, but too many children + behaves like nonmatching + doesn't match + on square brackets + with a node which meets only 1 requirement of [] + behaves like matching + matches + with a node which meets all requirements of [] + behaves like nonmatching + doesn't match + on a string + with a matching string + behaves like nonmatching + doesn't match + with a non-matching symbol + behaves like matching + matches + on a set + with a matching value + behaves like nonmatching + doesn't match + with a non-matching value + behaves like matching + matches + on a sequence + with a node with non-matching children + behaves like matching + matches + with a node of different type + behaves like matching + matches + with a matching node behaves like nonmatching doesn't match wildcards named wildcards + at the root level + behaves like matching + matches within a union + with a preceding unifying constraint + matching a branch + behaves like matching + matches + that can not be unified + behaves like nonmatching + doesn't match with a succeeding unifying constraint with all branches with the wildcard + that can not be unified + behaves like nonmatching + doesn't match matching another branch behaves like matching matches matching the first branch behaves like matching matches - that can not be unified - behaves like nonmatching - doesn't match with branches without the wildcard encountered first behaves like invalid @@ -1504,205 +3337,349 @@ without unification behaves like matching matches - with a preceding unifying constraint - matching a branch - behaves like matching - matches - that can not be unified - behaves like nonmatching - doesn't match - in head position of a sequence + within a sequence with other patterns intervening behaves like matching matches within a sequence unifying the node type with an argument behaves like matching matches - with values which can be unified - behaves like matching - matches with values which cannot be unified behaves like nonmatching doesn't match - within a sequence with other patterns intervening + with values which can be unified + behaves like matching + matches + in head position of a sequence behaves like matching matches - at the root level + unnamed wildcards + within a sequence with other patterns intervening behaves like matching matches - unnamed wildcards negated behaves like nonmatching doesn't match in head position of a sequence behaves like matching matches - within a sequence with other patterns intervening + at the root level behaves like matching matches within a sequence behaves like matching matches - at the root level - behaves like matching - matches + captures which also perform a match + on a sequence + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + 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 + 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 literal + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + 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 [] + 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 - unions - nested inside a sequence + yields the given argument if it is not a Node + captures on a wildcard + 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 + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + in head position in a sequence against nil (bug #5470) + behaves like nonmatching + doesn't match + in non-head position in a sequence + behaves like single capture + returns captured values if there is no block + 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 + in head position in a sequence against literal (bug #5470) + behaves like nonmatching + doesn't match + nil + nil literals behaves like matching matches - at the top level - containing integer literals - behaves like matching - matches - containing mixed node and literals - behaves like matching - matches - containing symbol literals - when the AST has a matching symbol - behaves like matching - matches - when the AST does not have a matching symbol - behaves like nonmatching - doesn't match - containing multiple [] - on a node which meets all requirements of the second [] - behaves like matching - matches - on a node which meets some requirements but not all - behaves like nonmatching - doesn't match - on a node which meets all requirements of the first [] - behaves like matching - matches - containing string literals - behaves like matching - matches - with a nested sequence + nil value in AST, use nil? method behaves like matching matches - bad syntax - with leading comma in arg list - behaves like invalid - is invalid - with negated closing curly - behaves like invalid - is invalid - with negated closing paren - behaves like invalid - is invalid - with doubled ellipsis - behaves like invalid - is invalid - with negated ellipsis - behaves like invalid - is invalid - with doubled comma in arg list - behaves like invalid - is invalid - with empty intersection - behaves like invalid - is invalid - with unmatched opening paren and `...` - behaves like invalid - is invalid - with unmatched opening paren - behaves like invalid - is invalid - with unmatched closing paren - behaves like invalid - is invalid - with unmatched opening curly - behaves like invalid - is invalid - with unmatched closing curly - behaves like invalid - is invalid - with empty union - behaves like invalid - is invalid - with empty parentheses + against a node pattern (bug #5470) + behaves like nonmatching + doesn't match + nil value in AST + behaves like nonmatching + doesn't match + commas + with commas randomly strewn around behaves like invalid is invalid - negation - on a set - with a matching value + caret (ascend) + using unification to match self within parent + with self in the wrong position behaves like nonmatching doesn't match - with a non-matching value + with self in the right position behaves like matching matches - on a sequence - with a node of different type + repeated twice + behaves like matching + matches + inside an intersection + behaves like matching + matches + within sequence + not in head behaves like matching matches - with a node with non-matching children + of a sequence + behaves like matching + matches + in head behaves like matching matches - with a matching node - behaves like nonmatching - doesn't match - on a string - with a matching string + of a sequence + behaves like matching + matches + used with a node type + which doesn't match behaves like nonmatching doesn't match - with a non-matching symbol - behaves like matching - matches - on square brackets - with a node which meets only 1 requirement of [] + which matches behaves like matching matches - with a node which meets all requirements of [] - behaves like nonmatching - doesn't match - on a symbol - with a non-matching symbol + inside a union + behaves like matching + matches + repeated + using * + behaves like repeated pattern + with one match + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + with an ellipsis in the same sequence + behaves like invalid + is invalid + at beginning of sequence + behaves like invalid + is invalid + without capture behaves like matching matches - with a non-matching symbol, but too many children + with no match behaves like nonmatching doesn't match - with a matching symbol + 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 + nested with multiple subcaptures + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with 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 + using + + with zero match behaves like nonmatching doesn't match - when nested in complex ways - with (send int :- int) - behaves like matching - matches - with (send str :+ (send str :to_i)) - behaves like matching - matches - with (send str :<< str) + with matching children + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + behaves like repeated pattern + with an ellipsis in the same sequence + behaves like invalid + is invalid + with one match + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + at beginning of sequence + behaves like invalid + is invalid + using ? + 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 + with too many matching children behaves like nonmatching doesn't match - macros - with a pattern with a constant + behaves like repeated pattern + with an ellipsis in the same sequence + behaves like invalid + is invalid + with one match + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + at beginning of sequence + behaves like invalid + is invalid + funcalls + without extra arguments behaves like matching matches - when the value is not in the set + with one argument + behaves like matching + matches + with multiple arguments + behaves like matching + matches + captures on ... + with a remaining literal at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with 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 + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining set at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining capture at the end + behaves like multiple capture + 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 remaining patterns at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + 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 + 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 no remaining pattern at the end + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with a remaining sequence at the end + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + in any order + captured + without ellipsis + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + invalid + at the beginning of a sequence + behaves like invalid + is invalid + with an ellipsis inside and outside + behaves like invalid + is invalid + doubled with ellipsis + behaves like invalid + is invalid + containing ellipsis not at the end + behaves like invalid + is invalid + nested + behaves like invalid + is invalid + doubled + separated by an ellipsis + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + separated by fixed argument + behaves like multiple capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + with a captured ellipsis + matching non sequential children + behaves like single capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + matching all children + behaves like single capture + yields captured value(s) and returns true if there is a block + returns captured values if there is no block + 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 + without ellipsis + with matching children + behaves like multiple capture + returns captured values if there is no block + yields captured value(s) and returns true if there is a block + with too few children + behaves like nonmatching + doesn't match + with too many children behaves like nonmatching doesn't match + with an 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 + 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 non-matching code behaves like nonmatching doesn't match when called on matching code behaves like matching matches - when it errors - raises an error with the right location without a predicate name - when it errors - raises an error with the right location - when called on matching code - returns an enumerator yielding the matches when called on non-matching code returns an enumerator yielding nothing + when called on matching code + returns an enumerator yielding the matches + when it errors + raises an error with the right location def_node_matcher when called on matching code behaves like matching @@ -1724,871 +3701,168 @@ yields captured value(s) and returns true if there is a block returns captured values if there is no block def_node_search - with a predicate name - when called on non-matching code - behaves like nonmatching - doesn't match - when called on matching code - behaves like matching - matches - when it errors - raises an error with the right location 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 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 - and no value is given to the matcher - uses the defaults some defaults are not params raises an error - 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) + and no value is given to the matcher + uses the defaults + when called on non-matching code + returns an enumerator yielding nothing + when it errors + raises an error with the right location + with a predicate name + when it errors + raises an error with the right location + when called on matching code + behaves like matching + matches + when called on non-matching code + behaves like nonmatching + doesn't match + with a pattern with a constant + when the value is not in the set + behaves like nonmatching + doesn't match + behaves like matching + matches + simple sequence + on a node with a different type behaves like nonmatching doesn't match - 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 - 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 + with a nested sequence in non-head position + behaves like matching + matches + on a node with too many children + behaves like nonmatching + doesn't match + on a node with the same type and non-matching children + with non-matching selector + behaves like nonmatching + doesn't match + with non-matching receiver type + behaves like nonmatching + doesn't match + with a nested sequence in head position + behaves like invalid + is invalid + on a node with the same type and matching children + behaves like matching + matches + predicates + when captured behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block - in head position in a sequence against nil (bug #5470) + when in last-child position, but all children have already been matched behaves like nonmatching doesn't match - caret (ascend) - repeated twice - 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 + with one extra argument + for which the predicate is false behaves like nonmatching doesn't match - used with a node type - which matches + for which the predicate is true behaves like matching matches - which doesn't match + with an expression argument + for which the predicate is false behaves like nonmatching doesn't match - within sequence - in head - of a sequence - behaves like matching - matches - behaves like matching - matches - not in head + for which the predicate is true behaves like matching matches - of a sequence - behaves like matching - matches - inside a union - behaves like matching - matches - inside an intersection + at head position of a sequence behaves like matching matches - ellipsis - at the very beginning of a sequence + when negated behaves like matching matches - 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 - 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 - with a nodetype at the end, but no remaining child to match it + applied to an integer for which the predicate is false behaves like nonmatching doesn't match - preceding multiple captures - behaves like multiple capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - 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 - params - when inside a union, with a matching value + with a constant argument + for which the predicate is true + behaves like matching + matches + for which the predicate is false + behaves like nonmatching + doesn't match + in root position behaves like matching matches - param number zero - in a position which matches original target node + with name containing a numeral behaves like matching matches - in a position which does not match original target node + with multiple arguments + for which the predicate is true + behaves like matching + matches + for which the predicate is false behaves like nonmatching doesn't match - when negated, with a matching value - behaves like nonmatching - doesn't match - when inside a union, with a nonmatching value - behaves like nonmatching - doesn't match - when captured - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - in root position - in root position + with a named argument + for which the predicate is true behaves like matching matches + when not given + raises an error + with extra arguments + raises an error + for which the predicate is false + behaves like nonmatching + doesn't match + applied to an integer for which the predicate is true behaves like matching matches - when negated, with a nonmatching value + literals + negative integer literals behaves like matching matches - as named parameters - when provided as argument to match - behaves like matching - matches - when not provided - raises an ArgumentError - when extra are provided - raises an ArgumentError - when inside an intersection + negative float literals behaves like matching matches - when preceded by $... - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - when preceded by ... + positive float literals behaves like matching matches - in a nested sequence + single quoted string literals behaves like matching matches - without explicit number + double quoted string literals behaves like matching matches - captures which also perform a match - on [] - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - 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 - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - when nested - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - on a 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 - on a literal - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - comments - behaves like single capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - in any order - invalid - containing ellipsis not at the end - behaves like invalid - is invalid - doubled with ellipsis - behaves like invalid - is invalid - at the beginning of a sequence - behaves like invalid - is invalid - with an ellipsis inside and outside - behaves like invalid - is invalid - nested - behaves like invalid - is invalid - without ellipsis - with too few children + bare literal + on a matching literal + behaves like matching + matches + on a node behaves like nonmatching doesn't match - with too many children + symbol literals + behaves like matching + matches + node type + for a child + on a child litteral behaves like nonmatching doesn't match - with matching children - behaves like multiple capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with 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 - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - nested - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - captured - without ellipsis - behaves like single capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - with 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 - doubled - separated by fixed argument - behaves like multiple capture - yields captured value(s) and returns true if there is a block - returns captured values if there is no block - separated by an ellipsis - behaves like multiple capture - returns captured values if there is no block - yields captured value(s) and returns true if there is a block - -RuboCop::AST::KeywordSplatNode - #value_delta - when using colon delimiters - when keyword splat is behind - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is left aligned - is expected to eq 0 - when using hash rocket 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 left aligned - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - #value - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - .new - is expected to equal true - #key_delta - with alignment set to :right - when using colon delimiters - when keyword splat is behind - is expected to eq 0 - when keyword splat is aligned - is expected to eq 0 - when keyword splat is on the same line - is expected to eq 0 - when keyword splat is ahead - is expected to eq 0 - when using hash rocket delimiters - when keyword splat is ahead - 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 aligned - is expected to eq 0 - with alignment set to :left - when using colon 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 - when using hash rocket delimiters - when keyword splat is aligned - is expected to eq 0 - when keyword splat is behind - is expected to eq -2 - when keyword splat is ahead - is expected to eq 2 - when keyword splat is on the same line - is expected to eq 0 - #hash_rocket? - is expected to be falsey - #same_line? - 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 - when both pairs are on the same line - is expected to be truthy - #colon? - is expected to be falsey - #key - is expected to eq s(:kwsplat, - s(:send, nil, :foo)) - #operator - is expected to eq "**" - -RuboCop::AST::CaseNode - #when_branches - is expected to all be when type - is expected to eq 3 - #branches - when compared to an IfNode - returns the same - 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 - #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" - #else? - without an else statement - is expected to be falsey - with an else statement - is expected to be truthy - .new - is expected to equal true - #else_branch - #else? - with an else statement - is expected to equal true - without an else statement - is expected to equal true - -RuboCop::AST::SymbolNode - #value - is expected to eq :foo - .new - with a symbol node - is expected to equal true - -RuboCop::AST::ForwardArgsNode - when using Ruby 2.7 or newer - #to_a - is expected to contain exactly (be forward arg type) - -RuboCop::AST::FloatNode - #value - is expected to eq 1.5 - .new - is expected to be truthy - #sign? - explicit positive float - is expected to be truthy - explicit negative float - is expected to be truthy - -RuboCop::AST::DefNode - #const_receiver? - with a class method definition - is expected to be falsey - with an instance method definition - is expected to be falsey - with a singleton method definition - is expected to be truthy - #assignment_method? - with a comparison method - is expected to be falsey - with an assignment method - is expected to be truthy - with a bracket assignment method - is expected to be truthy - with a regular method - is expected to be falsey - #method? - when message matches - when argument is a string - is expected to be truthy - when argument is a symbol - is expected to be truthy - when message does not match - when argument is a string - is expected to be falsey - when argument is a symbol - is expected to be falsey - .new - with a def node - is expected to equal true - with a defs 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 - #arguments - with multiple mixed arguments - is expected to eq 2 - with no arguments - is expected to equal true - with a single rest argument - is expected to eq 1 - with a single regular argument - is expected to eq 1 - with argument forwarding - is expected to eq 1 - with multiple regular arguments - is expected to eq 2 - #self_receiver? - with a class method definition - is expected to be truthy - with an instance method definition - is expected to be falsey - with a singleton method definition - is expected to be falsey - #body - with no body - is expected to equal true - with a multi-expression body - is expected to equal true - with a single expression body - is expected to equal true - #comparison_method? - with a regular method - is expected to be falsey - with a comparison method - is expected to be truthy - when using Ruby 2.7 or newer - #argument_forwarding? - is expected to be truthy - #operator_method? - 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 - with a setter method - is expected to be falsey - #last_argument - with a single keyword argument - is expected to equal true - with a single regular argument - is expected to equal true - with multiple regular arguments - is expected to equal true - with 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 - #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 - #receiver - with a singleton method definition - is expected to equal true - with an instance method definition - is expected to equal true - with a class method definition - is expected to equal true - #method_name - 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 - with a setter method - is expected to eq :foo= - #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 - #predicate_method? - with a bang method - is expected to be falsey - with a regular method - is expected to be falsey - with a predicate method - is expected to be truthy - #void_context? - with a regular method - is expected to be falsey - with an initializer method - is expected to be truthy - with a bracket assignment method - is expected to be truthy - with a regular assignment method - is expected to be truthy - with a comparison method - is expected to be falsey - #arguments? - with a single keyword argument - is expected to be truthy - with multiple regular arguments - is expected to be truthy - with a single regular argument - is expected to be truthy - with a single rest argument - is expected to be truthy - with no arguments - is expected to be falsey - with multiple mixed arguments - is expected to be truthy - #first_argument - with a single keyword argument - 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 a single regular argument - is expected to equal true - with no arguments - is expected to equal true - with multiple regular arguments - is expected to equal true - #rest_argument? - with mixed arguments - is expected to be truthy - with regular arguments - is expected to be falsey - with no arguments - is expected to be falsey - with a rest argument - is expected to be truthy - -RuboCop::AST::DefinedNode - #receiver - is expected to eq nil - .new - with a defined? node - is expected to equal true - #method_name - is expected to eq :defined? - #arguments - is expected to all be sym type - is expected to eq 1 - -RuboCop::AST::RegexpNode - #percent_r_literal? - 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 - with multi-line %r{-delimiters - is expected to eq true - #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 ["/", "/"] - #content - with an empty regexp with option - is expected to eq "" - with a regexp without option - is expected to eq ".+" - with a regexp with option - is expected to eq ".+" - with a multi-line regexp without option - is expected to eq "\n.+\n" - with an empty regexp - is expected to eq "" - with a multi-line regexp with option - is expected to eq "\n.+\n" - #regopt - with a multi-line regexp without option - is expected to equal true - is expected to equal true - with a regexp without option - is expected to equal true - is expected to equal true - with a regexp with option - is expected to eq [:i, :m, :x] - is expected to equal true - with an empty regexp with option - is expected to equal true - is expected to eq [:i, :x] - 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 - #interpolation? - with no interpolation returns false - is expected to eq false - with regexp quote - is expected to eq true - with direct variable interpoation - is expected to eq true - #delimiter? - with %r/-delimiters - is expected to eq true - is expected to eq false - is expected to eq false - is expected to eq false - is expected to eq false - is expected to eq false - is expected to eq false - with multi-line %r{-delimiters - is expected to eq false - is expected to eq false - is expected to eq true - is expected to eq true - is expected to eq false - is expected to eq false - is expected to eq false - is expected to eq false - with /-delimiters - 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 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 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 - #single_interpolation? - with no options - is expected to equal false - with o and other options - is expected to equal true - with only o option - is expected to equal true - with other options - is expected to equal false - #slash_literal? - with %r<-delimiters - is expected to eq false - with multi-line %r{-delimiters - is expected to eq false - with %r{-delimiters - is expected to eq false - with %r/-delimiters - is expected to eq false - with /-delimiters - is expected to eq true - #ignore_case? - 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 - with other options - is expected to equal false - #no_encoding? - with other options - is expected to equal false - with no options - is expected to equal false - with n and other options - is expected to equal true - with only n option - is expected to equal true - #multiline_mode? - with only m option - is expected to equal true - with no options - is expected to equal false - with other options - is expected to equal false - with m and other options - is expected to equal true - .new - is expected to equal true - #extended? - with no options - is expected to equal false - with x and other options - is expected to equal true - with only x option - is expected to equal true - with other options - is expected to equal false - #to_regexp - with a regexp without option - is expected to eq /.+/ - with a multi-line regexp with option - is expected to eq / -.+ -/ix - with an empty regexp with option - is expected to eq //ix - with an empty regexp - is expected to eq // - with a multi-line regexp without option - is expected to eq / -.+ -/ - with a regexp with an "o" option - is expected to eq "/abc/i" - with a regexp with option - is expected to eq /.+/mix - -RuboCop::AST::WhenNode - #branch_index - is expected to eq 0 - is expected to eq 1 - is expected to eq 2 - #each_condition - when not passed a block - is expected to equal true - when passed a block - yields all the conditions - #conditions - with a single condition - is expected to all be literal - is expected to eq 1 - with a multiple conditions - is expected to all be literal - is expected to eq 3 - .new - is expected to equal true - #then? - without a then keyword - is expected to be falsey - with a then keyword - is expected to be truthy - #body - with a then keyword - is expected to equal true - without a then keyword - is expected to equal true - -RuboCop::AST::ArgsNode - .new - with a lambda literal - is expected to equal true - with a method definition - is expected to equal true - with a block - is expected to equal true - #empty_and_without_delimiters? - with delimiters - with a method definition - is expected to equal false - with a lambda literal - is expected to equal false - with a block - is expected to equal false - with empty arguments - with a block - is expected to equal true - with a lambda literal - is expected to equal true - with a method definition - is expected to equal true - with arguments - with a lambda literal - is expected to equal false - with a method definition - is expected to equal false - -RuboCop::AST::SelfClassNode - #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 - #identifier - is expected to equal true - .new - is expected to equal true - -RuboCop::AST::ForNode - #loop_keyword? - is expected to be truthy - #post_condition_loop? - is expected to be falsey - .new - is expected to equal true - #do? - with a do keyword - is expected to be truthy - without a do keyword - is expected to be falsey - #void_context? - without a do keyword - is expected to be truthy - with a do keyword - is expected to be truthy - #variable - is expected to equal true - #body - is expected to equal true - #keyword - is expected to eq "for" - #collection - is expected to equal true + on a child with the same type + behaves like matching + matches + on a child with a different type + behaves like nonmatching + doesn't match + in seq head + on a child with a different type + behaves like nonmatching + doesn't match + on a node with the same type + behaves like matching + matches RuboCop::AST::PairNode #hash_rocket? @@ -2596,739 +3870,327 @@ is expected to be truthy when using a colon delimiter is expected to be falsey - #colon? - when using a hash rocket delimiter - is expected to be falsey - when using a colon delimiter - is expected to be truthy - #value + .new is expected to equal true #key_delta - with alignment set to :left + with alignment set to :right when using colon delimiters - when keys are aligned + 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 both keys are on the same line + when receiver key is behind + when both pairs are reail pairs + is expected to eq -2 + when second pair is a keyword splat + is expected to eq 0 + when keys are aligned + when second pair is a keyword splat + is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 + when using hash rocket delimiters + when receiver key is ahead when second pair is a keyword splat is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 2 when receiver key is behind when second pair is a keyword splat + is expected to eq 0 + when both pairs are explicit pairs is expected to eq -2 - when both pairs are reail pairs - is expected to eq -2 - when receiver key is ahead + when both keys are on the same line when both pairs are explicit pairs - is expected to eq 2 + is expected to eq 0 when second pair is a keyword splat - is expected to eq 2 - when using hash rocket delimiters + 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 + with alignment set to :left + when using hash rocket delimiters when receiver key is ahead when second pair is a keyword splat is expected to eq 2 when both pairs are explicit pairs is expected to eq 2 - when both keys are on the same line - when second pair is a keyword splat + when keys are aligned + when second key is a keyword splat is expected to eq 0 - when both pairs are explicit pairs + when both keys are explicit keys is expected to eq 0 when receiver key is behind when second pair is a keyword splat is expected to eq -2 when both pairs are explicit pairs is expected to eq -2 - with alignment set to :right - when using colon delimiters - when receiver key is behind - when both pairs are reail pairs - is expected to eq -2 + when both keys are on the same line when second pair is a keyword splat is expected to eq 0 - when 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 using colon delimiters when both keys are on the same line - when both pairs are explicit pairs - is expected to eq 0 when second pair is a keyword splat is expected to eq 0 - when receiver key is ahead when both pairs are explicit pairs - is expected to eq 2 + is expected to eq 0 + when keys are aligned when second pair is a keyword splat is expected to eq 0 - 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 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 + is expected to eq 2 + 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 0 - when keys are aligned - when both keys are explicit keys - is expected to eq 0 - when second key is a keyword splat - is expected to eq 0 - #key - when using a string key - is expected to equal true - when using a symbol key - is expected to equal true + is expected to eq -2 + when both pairs are reail pairs + is expected to eq -2 #value_on_new_line? - when value spans multiple lines - is expected to be falsey - when pair is on a single line - is expected to be falsey 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 + #value + 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 pair is a keyword splat + is expected to be truthy + when both pairs are explicit pairs + is expected to be truthy #delimiter when using a hash rocket delimiter is expected to eq " => " is expected to eq "=>" when using a colon delimiter - is expected to eq ": " is expected to eq ":" - .new - is expected to equal true - #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 " => " #value_delta - when using hash rocket delimiters + when using colon delimiters when receiver value is behind is expected to eq -2 + when receiver value is ahead + is expected to eq 2 + when both pairs are on the same line + is expected to eq 0 when values are aligned when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 - when both pairs are on the same line - is expected to eq 0 - when receiver value is ahead - is expected to eq 2 - when using colon delimiters - when receiver value is ahead - is expected to eq 2 + when using hash rocket delimiters when receiver value is behind is expected to eq -2 + when receiver value is ahead + is expected to eq 2 when values are aligned - when both pairs are explicit pairs - is expected to eq 0 when second pair is a keyword splat is expected to eq 0 + when both pairs are explicit pairs + is expected to eq 0 when both pairs are on the same line is expected to eq 0 - #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 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 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 - -RuboCop::AST::BlockNode - #keywords? - when enclosed in do-end keywords - is expected to be truthy - when enclosed in braces - is expected to be falsey - #arguments - 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 no arguments - is expected to equal true - with a single splat argument - is expected to eq 1 - #delimiters - when enclosed in braces - is expected to eq ["{", "}"] - when enclosed in do-end keywords - is expected to eq ["do", "end"] - #arguments? - with a single splat argument - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - with no arguments + #colon? + when using a hash rocket delimiter is expected to be falsey - >= Ruby 2.7 - using numbered parameters - is expected to equal false - with a single argument + when using a colon delimiter is expected to be truthy - #opening_delimiter - when enclosed in do-end keywords - is expected to eq "do" - when enclosed in braces - is expected to eq "{" + #key + when using a symbol key + is expected to equal true + when using a string key + is expected to equal true + #inverse_delimiter + when using a colon delimiter + is expected to eq "=>" + is expected to eq " => " + when using a hash rocket delimiter + is expected to eq ":" + is expected to eq ": " + +RuboCop::AST::CaseNode + #else_branch + #else? + with an else statement + is expected to equal true + without an else statement + is expected to equal true + #keyword + is expected to eq "case" + #branches + when there is an else + returns all the bodies + with an empty else + returns all the bodies + when compared to an IfNode + returns the same + when there is no else keyword + returns only then when bodies .new is expected to equal true - #closing_delimiter - when enclosed in do-end keywords - is expected to eq "end" - when enclosed in braces - is expected to eq "}" - #lambda? - when block belongs to a method lambda - is expected to be truthy - when block belongs to a non-lambda method - is expected to be falsey - when block belongs to a stabby lambda - is expected to be truthy - #multiline? - when block is on a single line - is expected to be falsey - when block is on several lines - is expected to be truthy - #void_context? - when block method is each - is expected to be truthy - when block method is not each - is expected to be falsey - when block method is tap - is expected to be truthy - #braces? - when enclosed in braces - is expected to be truthy - when enclosed in do-end keywords - is expected to be falsey - #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 - -RuboCop::AST::LambdaNode - #arguments - is expected to eq 2 - #receiver - is expected to eq nil - #method_name - is expected to eq :lambda - -RuboCop::AST::SendNode - #bang_method? - with a regular method - is expected to be falsey - with a predicate method - is expected to be falsey - with a bang method - is expected to be truthy - #def_modifier? - with several prefixed def modifiers - is expected to be truthy - with a prefixed def modifier - is expected to be truthy - #arguments - with a single literal argument - is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - with multiple mixed arguments - is expected to eq 2 - with a single splat argument - is expected to eq 1 - with no arguments - is expected to equal true - #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 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 - with a single literal argument - is expected to be truthy - with a single splat argument - is expected to be truthy - #nonmutating_hash_method? - with a nonmutating Hash method - is expected to be truthy - with a regular method - is expected to be falsey - with a mutating Hash method - is expected to be falsey - #macro? - with a receiver - when parent is a class - is expected to be falsey - when parent is a module - is expected to be falsey - without a receiver - when parent is a singleton class - is expected to be truthy - when parent is a begin without a parent - is expected to be truthy - when parent is a class - is expected to be truthy - when parent is a method definition - is expected to be falsey - when parent is a class constructor - is expected to be truthy - when parent is a keyword begin inside of an class - is expected to be truthy - when parent is a module - is expected to be truthy - without a parent - is expected to be truthy - when parent is a block - is expected to be truthy - #nonmutating_operator_method? - with a nonmutating unary operator method - is expected to be truthy - with a nonmutating binary operator method - 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 - #bare_access_modifier? - when node is a bare `protected` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node has an argument - is expected to be falsey - when node is a bare `public` - is expected to be truthy - when node is a bare `private` - is expected to be truthy - when node is a bare `module_function` - is expected to be truthy - #command? - when argument is a symbol - with an implicit receiver - is expected to be truthy - with an explicit receiver - is expected to be falsey - when argument is a string - with an implicit receiver - is expected to be truthy - with an explicit receiver - 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 - #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 - #binary_operation?? - with a binary operation + #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 regular method call - is expected to equal false - with a unary operation - is expected to equal false - with an implicit call method - is expected to equal false - #nonmutating_array_method? - with a regular method - is expected to be falsey - with a nonmutating Array method - is expected to be truthy - with a mutating Array method - is expected to be falsey - #operator_method? - with a unary operator method - is expected to be truthy - with a regular method - is expected to be falsey - with a setter method - is expected to be falsey - with a binary operator method - is expected to be truthy - #self_receiver? - with an implicit receiver - is expected to be falsey - with a self receiver - is expected to be truthy - with a non-self receiver + #else? + without an else statement is expected to be falsey - #enumerable_method? - with an enumerable method + with an else statement is expected to be truthy - with a regular method - is expected to be falsey - #last_argument - with multiple mixed arguments - is expected to equal true - with no arguments - is expected to equal true - with a single splat argument - is expected to equal true - with multiple literal arguments - is expected to equal true - with a single literal argument + +RuboCop::AST::HashNode + #pairs + with an empty hash is expected to equal true - #lambda? - with a non-lambda method - is expected to be falsey - with a stabby lambda method - is expected to be truthy - with a lambda method - is expected to be truthy - with a method named lambda in a class - is expected to be falsey - #implicit_call? - with an implicit call method - is expected to be truthy - with a regular method - is expected to be falsey - with an explicit call method - is expected to be falsey - #prefix_not? - with a bang method - is expected to be falsey - with keyword `not` + 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 + #pairs_on_same_line? + with all pairs on the same line is expected to be truthy - with a non-negated method + with no pairs on the same line is expected to be falsey - #access_modifier? - when node is a non-bare `protected` - is expected to be truthy - when node is a bare `public` - is expected to be truthy - when node is a bare `protected` - is expected to be truthy - when node is a non-bare `private` - is expected to be truthy - when node is a non-bare `public` - is expected to be truthy - when node is a bare `module_function` + with some pairs on the same line is expected to be truthy - when node is not an access modifier + #mixed_delimiters? + when all pairs are using a hash rocket delimiter is expected to be falsey - when node is a bare `private` - is expected to be truthy - when node is a non-bare `module_function` - is expected to be truthy - #nonmutating_string_method? - with a regular method + when all pairs are using a colon delimiter is expected to be falsey - with a nonmutating String method + when pairs are using different delimiters is expected to be truthy - with a mutating String method - is expected to be falsey .new - with a regular method send + is expected to equal true + #each_pair + when not passed a block is expected to equal true - with a safe navigation method send + when passed a block + yields all the pairs + #empty? + with an empty hash is expected to equal true - #splat_argument? - with mixed arguments - is expected to be truthy - with a splat argument - is expected to be truthy - with regular arguments - is expected to be falsey - with no arguments - is expected to be falsey - #assignment_method? - with a comparison method - is expected to be falsey - with a regular method - is expected to be falsey - with a bracket assignment method - is expected to be truthy - with an assignment method - is expected to be truthy - #nonmutating_unary_operator_method? - with a nonmutating unary operator method - is expected to be truthy - with a regular method - is expected to be falsey - #setter_method? - with a regular method - is expected to be falsey - with an indexed setter method - is expected to be truthy - with an operator method - is expected to be falsey - with a setter method + with a hash containing pairs + is expected to equal false + with a hash containing a keyword splat + is expected to equal false + #braces? + with braces is expected to be truthy - #attribute_accessor? - with an accessor - returns the accessor method and Array] - with a call without arguments - is expected to equal nil - #dot? - with a unary method - is expected to be falsey - without a dot - is expected to be falsey - with a double colon + as an argument with no braces is expected to be falsey - with a dot + as an argument with braces is expected to be truthy - #receiver - with a literal receiver - is expected to equal true - with no receiver - is expected to equal true - with a variable receiver - is expected to equal true - #first_argument - with no arguments - is expected to equal true - with multiple literal arguments - is expected to equal true - with a single splat argument + #keys + with a hash with string keys + is expected to eq 2 + is expected to all be str type + with an empty hash is expected to equal true - with a single literal argument + with a hash with symbol keys + is expected to eq 3 + is expected to all be sym type + #each_key + when not passed a block is expected to equal true - with multiple mixed arguments + when passed a block + yields all the pairs + #each_value + when not passed a block is expected to equal true - #loop_keyword? - is expected to equal false - #double_colon? - with a dot - is expected to be falsey - with a unary method - is expected to be falsey - with a double colon - is expected to be truthy - without a dot - 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 - #unary_operation? - with a unary operation + when passed a block + yields all the pairs + #values + 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 regular method call - is expected to equal false - with a binary operation - is expected to equal false - with an implicit call method - is expected to equal false - #method_name - with an implicit call method - is expected to eq :call - with a setter method - is expected to eq :bar= - with a plain method - is expected to eq :bar - with an operator method - is expected to eq :== - #comparison_method? - with a comparison method - is expected to be truthy - with a regular method - is expected to be falsey - with a negation method - is expected to be falsey - #post_condition_loop? - is expected to equal false - #block_node - with a block literal + with a hash with literal values + is expected to eq 3 + is expected to all be literal + +RuboCop::AST::OrNode + #lhs + with a semantic or node is expected to equal true - with a block argument + with a logical or node is expected to equal true - with no block + #inverse_operator + with a logical or node + is expected to eq "&&" + with a semantic or node + is expected to eq "and" + #rhs + with a semantic or node is expected to equal true - #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 - #block_argument? - with no arguments - is expected to be falsey - with a block argument - is expected to be truthy - with regular arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - #non_bare_access_modifier? - when node is a non-bare `public` - is expected to be truthy - when node is not an access modifier - is expected to be falsey - when node is a non-bare `private` - is expected to be truthy - when node does not have an argument - is expected to be falsey - when node is a non-bare `module_function` - is expected to be truthy - when node is a non-bare `protected` - is expected to be truthy - #nonmutating_binary_operator_method? - with a nonmutating binary operator method - 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 - #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 - #const_receiver? - with a constant receiver - is expected to be truthy - with a self receiver - is expected to be falsey - with a non-constant receiver - is expected to be falsey - #prefix_bang? - with a bang method - is expected to be truthy - with keyword `not` - is expected to be falsey - with a non-negated method - is expected to be falsey - #lambda_literal? - with a lambda method - is expected to equal false - with a non-lambda method - is expected to be falsey - with `a.() {}` style method - is expected to be falsey - with a stabby lambda + with a logical or node is expected to equal true - #negation_method? - with suffix `not` - is expected to be falsey - with a non-negated method - is expected to be falsey - with prefix bang - is expected to be truthy - with prefix `not` - is expected to be truthy - -RuboCop::AST::AndNode #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" + with a semantic or node + is expected to eq "||" + with a logical or node + is expected to eq "or" #semantic_operator? - with a semantic and node - is expected to equal true - with a logical and node + with a logical or node is expected to equal false - #lhs - with a logical and node - is expected to equal true - with a semantic and node + with a semantic or node is expected to equal true - #inverse_operator - with a semantic and node - is expected to eq "or" - with a logical and node + #operator + with a logical or node is expected to eq "||" + with a semantic or node + is expected to eq "or" #logical_operator? - with a logical and node + with a logical or node is expected to equal true - with a semantic and node + with a semantic or node 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 semantic and node + with a semantic or node is expected to equal true - with a logical and node + with a logical or node is expected to equal true -RuboCop::AST::ClassNode +RuboCop::AST::SelfClassNode #identifier is expected to equal true - #body - with a multi-expression body - is expected to equal true - with an empty body - is expected to equal nil - with a single expression body - is expected to equal true - #parent_class - when a parent class is specified - is expected to equal true - when no parent class is specified - is expected to equal nil .new is expected to equal true - -RuboCop::AST::ModuleNode #body with a single expression body is expected to equal true @@ -3336,1051 +4198,224 @@ is expected to equal true with an empty body is expected to equal nil - .new - is expected to equal true - #identifier - is expected to equal true - -RuboCop::AST::IntNode - #value - is expected to eq 10 - .new - is expected to be truthy - #sign? - explicit negative int - is expected to be truthy - explicit positive int - is expected to be truthy 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 splat 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 multiple literal arguments + is expected to eq 2 with a single argument and braces is expected to eq 1 - with no arguments - is expected to equal true with a single argument is expected to eq 1 - with multiple literal arguments - is expected to eq 2 - -RuboCop::AST::ProcessedSource - #file_path - returns file path - #ast - is the root node of AST - #[] - when an index is passed - returns the line - when start index and length are passed - returns the array of lines - when a range is passed - returns the array of lines - #path - is the path passed to .new - .from_file - raises a Errno::ENOENT when the file does not exist - when the file exists - sets the file path to the instance's #path - returns an instance of ProcessedSource - #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 - #preceding_line - returns source of line before token - #following_line - returns source of line after token - #comments - is an array of comments - when the source is invalid - returns [] - with heavily commented source - #contains_comment? - provided source_range on line with comment - is expected to equal true - provided source_range on line without comment - is expected to equal false - provided a multiline source_range with at least one line with comment - is expected to equal true - provided source_range on comment line - is expected to equal true - #find_comment - yields nil when there is no match - yields correct comment - #comment_at_line - returns the comment at the given line number - returns nil if line has no comment - #each_comment - yields all comments - #each_comment_in_lines - yields the comments - #comments_before_line - returns comments on or before given line - #line_with_comment? - returns false for lines without comments - returns true for lines with comments - token enumerables - #find_token - yields correct token - yields nil when there is no match - #each_token - yields all tokens - #lines - is an array - has same number of elements as line count - contains lines as string without linefeed - #tokens - has an array of tokens - #blank? - with source with content - returns false - with source of no content - returns true - valid_syntax? - when the source is completely valid - 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 invalid - returns false - when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI - returns true - when a line starts with an integer literal - tokenizes the source correctly - #buffer - is a source buffer - #parser_error - when the source could not be parsed due to encoding error - returns the error - when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII - is nil - when the source was properly parsed - is nil - -RuboCop::AST::YieldNode - #last_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 - #camel_case_method? - is expected to be falsey - #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 literal argument - is expected to eq 1 - with a single splat argument - is expected to eq 1 - #setter_method? - is expected to be falsey - #method? - when message matches - when argument is a symbol - is expected to be truthy - when argument is a string - is expected to be truthy - when message does not match - when argument is a symbol - is expected to be falsey - when argument is a string - is expected to be falsey - #block_literal? - is expected to be falsey - #implicit_call? - 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 - #splat_argument? - with no arguments - is expected to be falsey - with regular arguments - is expected to be falsey - with mixed arguments - is expected to be truthy - with a splat argument - is expected to be truthy - #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 - is expected to equal true - #comparison_method? - is expected to be falsey - #arguments? - with a single literal argument - is expected to be truthy - with no arguments - is expected to be falsey - with multiple literal arguments - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - with a single splat argument - is expected to be truthy - #const_receiver? - is expected to be falsey - #block_node - is expected to equal true - #method_name - is expected to eq :yield - .new - is expected to equal true - #receiver - is expected to equal true - #macro? - is expected to be falsey - #predicate_method? - is expected to be falsey - #dot? - is expected to be falsey - #parenthesized? - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with no arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - #assignment_method? - is expected to be falsey - #self_receiver? - is expected to be falsey - #bang_method? - is expected to be falsey - #operator_method? - is expected to be falsey - #block_argument? - is expected to be falsey - #double_colon? - is expected to be falsey - -RuboCop::AST::UntilNode - #loop_keyword? - with a statement until - is expected to be truthy - with a modifier until - is expected to be truthy - #post_condition_loop? - with a statement until - is expected to be falsey - with a modifier until - is expected to be truthy - #keyword - is expected to eq "until" - .new - with a modifier until - is expected to equal true - with a statement until - is expected to equal true - #inverse_keyword - is expected to eq "while" - #do? - without a do keyword - is expected to be falsey - with a do keyword - is expected to be truthy - -RuboCop::AST::ReturnNode - behaves like wrapped arguments node .new with arguments is expected to equal true without arguments is expected to equal true - #arguments - with a single splat argument - is expected to eq 1 - with a single argument - is expected to eq 1 - with no arguments - is expected to equal true - with multiple literal arguments - is expected to eq 2 - with no arguments and braces - is expected to equal true - with a single argument and braces - is expected to eq 1 -RuboCop::AST::IfNode - #nested_conditional? - with nested conditionals in if clause - is expected to be truthy - with no nested conditionals - is expected to be falsey - with nested ternary operators - when nested in the truthy branch - is expected to be truthy - when nested in the falsey branch - is expected to be truthy - with nested conditionals in elsif clause - is expected to be truthy - with nested conditionals in else clause +RuboCop::AST::FloatNode + #value + is expected to eq 1.5 + .new + is expected to be truthy + #sign? + explicit positive float is expected to be truthy - #else? - with an elsif statement + explicit negative float is expected to be truthy - without an else statement + +RuboCop::AST::DefNode + #bang_method? + with a predicate method is expected to be falsey - #else_branch - with an if statement - is expected to equal true - with an unless statement - is expected to equal true - with a ternary operator - is expected to equal true - #keyword - with an unless statement - is expected to eq "unless" - with a ternary operator - is expected to eq "" - with an if statement - is expected to eq "if" - #elsif_conditional? - with multiple elsif conditionals + with a bang method is expected to be truthy - with nested conditionals in else clause + with a regular method 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 one elsif conditional + #comparison_method? + with a comparison method is expected to be truthy - with nested conditionals in if clause + with a regular method is expected to be falsey - #unless? - with an unless statement + #operator_method? + with a binary operator method is expected to be truthy - with an if statement - is expected to be falsey - with a ternary operator + with a setter method is expected to be falsey - #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" - #elsif? - with an if statement comtaining an elsif + with a regular method is expected to be falsey - with an elsif statement + with a unary operator method is expected to be truthy - without an elsif statement - is expected to be falsey - #branches - with an if statement - is expected to all be literal - is expected to eq 1 - with an elsif statement - is expected to eq 3 - is expected to all be literal - with an else statement - is expected to all be literal - is expected to eq 2 - with an unless statement - is expected to eq 1 - is expected to all be literal - #if_branch - with an if statement - is expected to equal true - with an unless statement - is expected to equal true - with a ternary operator - is expected to equal true - .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 - #modifier_form? - with a modifier if statement + #arguments? + with a single keyword argument is expected to be truthy - with a non-modifier unless statement - is expected to be falsey - with a ternary operator - is expected to be falsey - with a modifier unless statement + with multiple mixed arguments is expected to be truthy - with a non-modifier if statement - is expected to be falsey - #each_branch - when passed a block - yields all the branches - when not passed a block - is expected to equal true - #if? - with an unless statement - is expected to be falsey - with a ternary operator + with no arguments is expected to be falsey - with an if statement + with a single regular argument is expected to be truthy - #ternary? - with a ternary operator + with multiple regular arguments is expected to be truthy - with an if statement - is expected to be falsey - with an unless statement - is expected to be falsey - -RuboCop::AST::CaseMatchNode - when using Ruby 2.7 or newer - #in_pattern_branches - is expected to all be in pattern type - is expected to eq 3 - #else? - without an else statement - is expected to equal false - with an else statement - is expected to equal true - #keyword - is expected to eq "case" - #else_branch - #else? - without an else statement - is expected to equal true - with an else statement - is expected to equal true - .new + with a single rest argument + is expected to be truthy + #first_argument + with a single regular argument is expected to equal true - #each_in_pattern - when not passed a block - is expected to equal true - when passed a block - yields all the conditions - -RuboCop::AST::StrNode - #heredoc? - with a heredoc + with multiple regular arguments is expected to equal true - with a string with interpolation - is expected to equal false - with a normal string - is expected to equal false - .new - with a heredoc + with multiple mixed arguments is expected to equal true - with a string with interpolation + with a single rest argument is expected to equal true - with a normal string + with no arguments is expected to equal true - -RuboCop::AST::EnsureNode - .new - is expected to equal true - #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::WhileNode - #post_condition_loop? - with a modifier while + with a single keyword argument + is expected to equal true + #camel_case_method? + with a camel case method is expected to be truthy - with a statement while + with a regular method is expected to be falsey - #keyword - is expected to eq "while" - #loop_keyword? - with a modifier while - is expected to be truthy - with a statement while - is expected to be truthy - #do? - with a do keyword + #rest_argument? + with mixed arguments is expected to be truthy - without a do keyword + with no arguments is expected to be falsey - #inverse_keyword - is expected to eq "until" - .new - with a statement while - is expected to equal true - with a modifier while - is expected to equal true - -RuboCop::AST::SuperNode - #block_argument? - with a block argument + with a rest argument is expected to be truthy with regular arguments is expected to be falsey - with mixed arguments + #method? + when message does not match + when argument is a string + is expected to be falsey + when argument is a symbol + is expected to be falsey + when message matches + when argument is a string + is expected to be truthy + when argument is a symbol + is expected to be truthy + when using Ruby 2.7 or newer + #argument_forwarding? is expected to be truthy + #last_argument with no arguments - is expected to be falsey - #method_name - is expected to eq :super - #setter_method? - is expected to be falsey - .new - with a zsuper node is expected to equal true - with a super node - is expected to equal true - #first_argument - with multiple mixed arguments + with multiple regular arguments is expected to equal true - with a single literal argument + with a single rest argument is expected to equal true - with a single splat argument + with a single keyword argument is expected to equal true - with multiple literal arguments + with a single regular argument is expected to equal true - with no arguments + with multiple mixed arguments is expected to equal true - #macro? - is expected to be falsey - #const_receiver? - is expected to be falsey #receiver - is expected to equal true - #camel_case_method? - is expected to be falsey - #self_receiver? - is expected to be falsey - #comparison_method? - is expected to be falsey - #assignment_method? - is expected to be falsey - #block_node - with a block literal + with an instance method definition is expected to equal true - with a block argument + with a class method definition is expected to equal true - with no block + with a singleton method definition is expected to equal true #arguments - with multiple literal arguments - is expected to eq 2 - with no arguments - is expected to equal true - with a single literal argument + with argument forwarding is expected to eq 1 - with a single splat argument + with a single rest argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 - #double_colon? - 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 string - is expected to be falsey - when argument is a symbol - is expected to be falsey - #parenthesized? - with arguments - when not using parentheses - is expected to be falsey - when using parentheses - is expected to be truthy - with no arguments - when using parentheses - is expected to be truthy - when not using parentheses - is expected to be falsey - #command? - when argument is a string - is expected to be truthy - when argument is a symbol - is expected to be truthy - #splat_argument? with no arguments + is expected to equal true + with multiple regular arguments + is expected to eq 2 + with a single regular argument + is expected to eq 1 + #self_receiver? + with a singleton method definition is expected to be falsey - with a splat argument + with a class method definition is expected to be truthy - with regular arguments + with an instance method definition is expected to be falsey - with mixed arguments - is expected to be truthy - #predicate_method? - is expected to be falsey - #dot? - is expected to be falsey - #implicit_call? - is expected to be falsey - #arguments? - with a single literal argument - is expected to be truthy - with multiple literal arguments - is expected to be truthy - with multiple mixed arguments - is expected to be truthy - with no arguments + #const_receiver? + with an instance method definition is expected to be falsey - with a single splat argument + with a class method definition + is expected to be falsey + with a singleton method definition is expected to be truthy - #bang_method? - is expected to be falsey - #operator_method? - is expected to be falsey - #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 mixed arguments - is expected to equal true - with multiple literal arguments - is expected to equal true - #block_literal? - with a block literal + #block_argument? + with mixed arguments is expected to be truthy - with no block + 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::ResbodyNode - #exception_variable - when an exception variable is not given - is expected to equal nil - for an explicit rescue - is expected to eq "ex" - for an implicit rescue - is expected to eq "ex" .new - is expected to equal true - #body - is expected to equal true - -RuboCop::AST::Node - #module_definition? - with ::ModuleName - matches - nested modules - matches - prepend Module.new - matches - namespaced modules - matches - using module keyword - matches - with Module.new - matches - included module definition - matches - #pure? - for a method call - returns false - for a module definition - returns false - for an array literal - which contains a method call - returns false - with only literal children - returns true - for a hash literal - which contains a method call - returns false - with only literal children - returns true - for a gvar assignment - returns false - for an integer literal - returns true - for a class definition - returns false - for a cvar assignment - 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 regexp - with options - returns true - with no interpolation - returns true - with interpolated segments - returns false - for an lvar assignment - returns false - for an ivar assignment - returns false - #recursive_basic_literal? - behaves like literal - returns true for `/./` - behaves like literal - returns true for `!true` - behaves like literal - returns true for `(1)` - behaves like non literal - returns false for `/.#{some_method_call}/` - behaves like literal - returns true for `1.0` - behaves like literal - returns true for `false` - behaves like non literal - returns false for `some_method_call(x, y)` - behaves like non literal - returns false for `[some_method_call]` - behaves like literal - returns true for `"#{2}"` - behaves like literal - returns true for `nil` - behaves like literal - returns true for `%r{abx}ixo` - behaves like literal - returns true for `{ a: 1, b: 2 }` - behaves like non literal - returns false for `(x && false)` - behaves like non literal - returns false for `{ some_method_call => :sym }` - behaves like non literal - returns false for `%r{abx#{foo}}ixo` - behaves like literal - returns true for `(false or true)` - behaves like literal - returns true for `(false && true)` - behaves like literal - returns true for `'str'` - behaves like non literal - returns false for `{ :sym => some_method_call }` - behaves like literal - returns true for `[1, 2, 3]` - behaves like literal - returns true for `{ :a => 1, :b => 2 }` - behaves like non literal - returns false for `(x or false)` - behaves like literal - returns true for `1` - behaves like non literal - returns false for `some_method_call` - behaves like non literal - returns false for `(x == false)` - behaves like literal - returns true for `(false <=> true)` - #value_used? - within a method call node - is always true - at the top level - is false - within a module definition node - is always true - within a class definition node - is always true - within a while node - is true only for the condition - at the end of a block - is always true - within a singleton class node - is always true - within an array literal - at the top level - is always false - assigned to an ivar - is always true - within an if...else..end node - nested in a method call - is always true - at the top level - is true only for the condition - #class_constructor? - module definition with a block - matches - class definition - does not match - class definition on outer scope - matches - class definition with a block - matches - #struct_constructor? - struct definition with a block - matches - ::Struct - matches - struct definition without block - does not match - #sibling_index - returns its sibling index - #class_definition? - constant defined as Struct without block - does not match - with ::ClassName - matches - with Class.new - matches - with Struct - matches - with object singleton class - matches - with self singleton class - matches - with inheritance - matches - without inheritance - matches - namespaced class - matches - #argument_type? - method arguments - returns true for all argument types - block arguments - returns true for all argument types - -RuboCop::AST::Ext::Range - #line_span - accepts an `exclude_end` keyword argument - returns the range of lines a range occupies - -RuboCop::AST::ArrayNode - #each_value - with block - is expected to eq ["(int 1)", "(int 2)", "(int 3)"] + with a defs node is expected to equal true - without block + with a def node is expected to equal true - #percent_literal? - with a symbol percent literal - is expected to be truthy + #assignment_method? + with a regular method is expected to be falsey + with a bracket assignment method is expected to be truthy - with a string percent literal - is expected to be truthy - is expected to be truthy - is expected to be falsey - with square brackets - is expected to be falsey - is expected to be falsey + with a comparison method is expected to be falsey - #bracketed? - with a percent literal - is expected to equal true - unbracketed - is expected to equal nil - with square brackets - is expected to equal true - #values - with an array of literals - is expected to eq 3 - is expected to all be literal - with an empty array - is expected to equal true - with an array of variables - is expected to all be send type - is expected to eq 2 - .new - is expected to equal true - #square_brackets? - with square brackets + with an assignment method is expected to be truthy - with a percent literal - is expected to be falsey - -RuboCop::AST::Token - #to_s - returns string of token data - #line - returns line of token - #space_before - returns nil when it is on the first line - returns truthy MatchData when there is a space before token - returns nil when there is not a space before token - .from_parser_token - sets parser token's text to rubocop token's text - sets parser token's range to rubocop token's pos - returns a #to_s useful for debugging - sets parser token's type to rubocop token's type - #column - returns index of first char in token range on that line - #begin_pos - returns index of first char in token range of entire source - #space_after - returns truthy MatchData when there is a space after token - returns nil when there is not a space after token - type predicates - #left_array_bracket? - returns false for non left_array_bracket tokens - returns true for left_array_bracket tokens - #left_bracket? - returns true for all left_bracket tokens - returns false for non left_bracket tokens - with braces & parens - #left_brace? - returns false for non left hash brace tokens - returns true for left hash brace tokens - #left_parens? - returns false for non left parens tokens - returns true for left parens tokens - #right_parens? - returns true for right parens tokens - returns false for non right parens tokens - #right_curly_brace? - returns false for non right brace tokens - returns true for all right brace tokens - #left_curly_brace? - returns true for left block brace tokens - returns false for non left block brace tokens - #rescue_modifier? - returns true for rescue modifier tokens - returns false for non rescue modifier tokens - #left_ref_bracket? - returns false for non left_ref_bracket tokens - returns true for left_ref_bracket tokens - #comma? - returns false for non comma tokens - returns true for comma tokens - #left_brace? - returns true for right_bracket tokens - returns false for non right_bracket tokens - #end? - returns false for non end tokens - returns true for end tokens - #semicolon? - returns true for semicolon tokens - returns false for non semicolon tokens - #equals_sign? - returns true for equals sign tokens - returns false for non equals sign tokens - #comment? - returns false for non comment tokens - returns true for comment tokens - #right_bracket? - returns true for all right_bracket tokens - returns false for non right_bracket tokens - #end_pos - returns index of last char in token range of entire source - -RuboCop::AST::HashNode - #each_value - when not passed a block - is expected to equal true - when passed a block - yields all the pairs - .new - is expected to equal true - #mixed_delimiters? - when all pairs are using a hash rocket delimiter + #predicate_method? + with a regular method is expected to be falsey - when all pairs are using a colon delimiter + with a bang method is expected to be falsey - when pairs are using different delimiters + with a predicate method is expected to be truthy - #each_key - when passed a block - yields all the pairs - when not passed a block - is expected to equal true - #each_pair - when not passed a block - is expected to equal true - when passed a block - yields all the pairs - #pairs - with an empty hash - is expected to equal true - with a hash of variables - is expected to all be pair type - is expected to eq 2 - with a hash of literals - is expected to all be pair type - is expected to eq 3 - #empty? - with a hash containing pairs - is expected to equal false - with a hash containing a keyword splat - is expected to equal false - with an empty hash - is expected to equal true - #values - with an empty hash - is expected to equal true - with a hash with literal values - is expected to all be literal - is expected to eq 3 - with a hash with string keys - is expected to eq 2 - is expected to all be send type - #pairs_on_same_line? - with all pairs on the same line + #void_context? + with a bracket assignment method is expected to be truthy - with some pairs on the same line + with an initializer method is expected to be truthy - with no pairs on the same line + with a regular method is expected to be falsey - #braces? - with braces - is expected to be truthy - as an argument with braces + with a regular assignment method is expected to be truthy - as an argument with no braces + with a comparison method is expected to be falsey - #keys - with an empty hash + #body + with no body is expected to equal true - with a hash with symbol keys - 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 + with a single expression body + is expected to equal true + with a multi-expression body + is expected to equal true + #method_name + with an operator method + is expected to eq :== + with a setter method + is expected to eq :foo= + with a plain method + is expected to eq :foo + with a unary method + is expected to eq :-@ -Finished in 4.68 seconds (files took 2.39 seconds to load) +Finished in 6.61 seconds (files took 2.95 seconds to load) 1401 examples, 0 failures -Randomized with seed 36650 +Randomized with seed 29656 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -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/26336/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/26336/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/3855 and its subdirectories -I: Current time: Tue Aug 24 05:36:11 -12 2021 -I: pbuilder-time-stamp: 1629826571 +I: removing directory /srv/workspace/pbuilder/26336 and its subdirectories +I: Current time: Wed Aug 25 07:37:56 +14 2021 +I: pbuilder-time-stamp: 1629826676