Input buildinfo: https://buildinfos.debian.net/buildinfo-pool/r/ruby-rubocop-ast/ruby-rubocop-ast_0.6.0-1_all.buildinfo Use metasnap for getting required timestamps New buildinfo file: /tmp/ruby-rubocop-ast-0.6.0-1nf4r9aaw/ruby-rubocop-ast_0.6.0-1_all.buildinfo Get source package info: ruby-rubocop-ast=0.6.0-1 Source URL: http://snapshot.notset.fr/mr/package/ruby-rubocop-ast/0.6.0-1/srcfiles?fileinfo=1 env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin TMPDIR=/tmp mmdebstrap --arch=amd64 --include=adduser=3.118 autoconf=2.71-2 automake=1:1.16.5-1.1 autopoint=0.21-4 autotools-dev=20180224.1+nmu1 base-files=12 base-passwd=3.5.52 bash=5.1-5 binutils=2.37-10 binutils-common=2.37-10 binutils-x86-64-linux-gnu=2.37-10 bsdextrautils=2.37.2-4 bsdutils=1:2.37.2-4 build-essential=12.9 bzip2=1.0.8-5 ca-certificates=20211016 coreutils=8.32-4.1 cpp=4:11.2.0-2 cpp-11=11.2.0-12 dash=0.5.11+git20210903+057cd650a4ed-3 debconf=1.5.79 debhelper=13.5.2 debianutils=5.5-1 devscripts=2.21.6 dh-autoreconf=20 dh-strip-nondeterminism=1.12.1-1 diffutils=1:3.7-5 dirmngr=2.2.27-2 dpkg=1.20.9 dpkg-dev=1.20.9 dwz=0.14-1 fakeroot=1.26-1 file=1:5.41-2 findutils=4.8.0-1 g++=4:11.2.0-2 g++-11=11.2.0-12 gcc=4:11.2.0-2 gcc-11=11.2.0-12 gcc-11-base=11.2.0-12 gem2deb=1.8 gem2deb-test-runner=1.8 gettext=0.21-4 gettext-base=0.21-4 gnupg=2.2.27-2 gnupg-l10n=2.2.27-2 gnupg-utils=2.2.27-2 gpg=2.2.27-2 gpg-agent=2.2.27-2 gpg-wks-client=2.2.27-2 gpg-wks-server=2.2.27-2 gpgconf=2.2.27-2 gpgsm=2.2.27-2 gpgv=2.2.27-2 grep=3.7-1 groff-base=1.22.4-7 gzip=1.10-4 hostname=3.23 init-system-helpers=1.60 intltool-debian=0.35.0+20060710.5 libacl1=2.3.1-1 libarchive-zip-perl=1.68-1 libasan6=11.2.0-12 libassuan0=2.5.5-1 libatomic1=11.2.0-12 libattr1=1:2.5.1-1 libaudit-common=1:3.0.6-1 libaudit1=1:3.0.6-1+b1 libb-hooks-op-check-perl=0.22-1+b3 libbinutils=2.37-10 libblkid1=2.37.2-4 libbsd0=0.11.3-1 libbz2-1.0=1.0.8-5 libc-bin=2.32-5 libc-dev-bin=2.32-5 libc6=2.32-5 libc6-dev=2.32-5 libcap-ng0=0.7.9-2.2+b1 libcap2=1:2.44-1 libcc1-0=11.2.0-12 libclass-method-modifiers-perl=2.13-1 libclass-xsaccessor-perl=1.19-3+b7 libcom-err2=1.46.4-1 libcrypt-dev=1:4.4.26-1 libcrypt1=1:4.4.26-1 libctf-nobfd0=2.37-10 libctf0=2.37-10 libdb5.3=5.3.28+dfsg1-0.8 libdebconfclient0=0.261 libdebhelper-perl=13.5.2 libdevel-callchecker-perl=0.008-1+b2 libdpkg-perl=1.20.9 libdynaloader-functions-perl=0.003-1.1 libedit2=3.1-20210910-1 libelf1=0.186-1 libencode-locale-perl=1.05-1.1 libexpat1=2.4.1-3 libfakeroot=1.26-1 libffi8=3.4.2-3 libfile-dirlist-perl=0.05-2 libfile-homedir-perl=1.006-1 libfile-listing-perl=6.14-1 libfile-stripnondeterminism-perl=1.12.1-1 libfile-touch-perl=0.12-1 libfile-which-perl=1.23-1 libgcc-11-dev=11.2.0-12 libgcc-s1=11.2.0-12 libgcrypt20=1.9.4-4 libgdbm-compat4=1.22-1 libgdbm6=1.22-1 libgmp-dev=2:6.2.1+dfsg-3 libgmp10=2:6.2.1+dfsg-3 libgmpxx4ldbl=2:6.2.1+dfsg-3 libgnutls30=3.7.2-2 libgomp1=11.2.0-12 libgpg-error0=1.42-3 libgssapi-krb5-2=1.18.3-7 libhogweed6=3.7.3-1 libhtml-parser-perl=3.76-1 libhtml-tagset-perl=3.20-4 libhtml-tree-perl=5.07-2 libhttp-cookies-perl=6.10-1 libhttp-date-perl=6.05-1 libhttp-message-perl=6.35-1 libhttp-negotiate-perl=6.01-1 libicu67=67.1-7 libidn2-0=2.3.2-2 libimport-into-perl=1.002005-1 libio-html-perl=1.004-2 libio-pty-perl=1:1.15-2 libio-socket-ssl-perl=2.072-1 libipc-run-perl=20200505.0-1 libisl23=0.24-2 libitm1=11.2.0-12 libk5crypto3=1.18.3-7 libkeyutils1=1.6.1-2 libkrb5-3=1.18.3-7 libkrb5support0=1.18.3-7 libksba8=1.6.0-2 libldap-2.4-2=2.4.59+dfsg-1 liblsan0=11.2.0-12 liblwp-mediatypes-perl=6.04-1 liblwp-protocol-https-perl=6.10-1 liblz4-1=1.9.3-2 liblzma5=5.2.5-2 libmagic-mgc=1:5.41-2 libmagic1=1:5.41-2 libmd0=1.0.4-1 libmodule-runtime-perl=0.016-1 libmoo-perl=2.005004-3 libmount1=2.37.2-4 libmpc3=1.2.1-1 libmpdec3=2.5.1-2 libmpfr6=4.1.0-3 libncursesw6=6.3-1 libnet-http-perl=6.21-1 libnet-ssleay-perl=1.90-1 libnettle8=3.7.3-1 libnpth0=1.6-3 libnsl-dev=1.3.0-2 libnsl2=1.3.0-2 libp11-kit0=0.24.0-6 libpam-modules=1.4.0-10 libpam-modules-bin=1.4.0-10 libpam-runtime=1.4.0-10 libpam0g=1.4.0-10 libparams-classify-perl=0.015-1+b3 libpcre2-8-0=10.39-3 libpcre3=2:8.39-13 libperl5.32=5.32.1-6 libpipeline1=1.5.4-1 libpython3-stdlib=3.9.8-1 libpython3.9-minimal=3.9.9-1 libpython3.9-stdlib=3.9.9-1 libquadmath0=11.2.0-12 libreadline8=8.1-2 librole-tiny-perl=2.002004-1 libruby2.7=2.7.4-1+b1 libruby3.0=3.0.2-5 libsasl2-2=2.1.27+dfsg2-2 libsasl2-modules-db=2.1.27+dfsg2-2 libseccomp2=2.5.3-2 libselinux1=3.3-1+b1 libsemanage-common=3.3-1 libsemanage2=3.3-1+b1 libsepol2=3.3-1 libsigsegv2=2.13-1 libsmartcols1=2.37.2-4 libsqlite3-0=3.36.0-2 libssl1.1=1.1.1l-1 libstdc++-11-dev=11.2.0-12 libstdc++6=11.2.0-12 libsub-override-perl=0.09-2 libsub-quote-perl=2.006006-1 libsystemd0=249.7-1 libtasn1-6=4.18.0-4 libtimedate-perl=2.3300-2 libtinfo6=6.3-1 libtirpc-common=1.3.2-2 libtirpc-dev=1.3.2-2 libtirpc3=1.3.2-2 libtool=2.4.6-15 libtry-tiny-perl=0.31-1 libtsan0=11.2.0-12 libubsan1=11.2.0-12 libuchardet0=0.0.7-1 libudev1=249.7-1 libunistring2=0.9.10-6 liburi-perl=5.10-1 libuuid1=2.37.2-4 libwww-perl=6.59-1 libwww-robotrules-perl=6.02-1 libxml2=2.9.12+dfsg-5+b1 libyaml-0-2=0.2.2-1 libzstd1=1.4.8+dfsg-3 linux-libc-dev=5.15.5-1 login=1:4.8.1-2 lsb-base=11.1.0 m4=1.4.18-5 make=4.3-4.1 man-db=2.9.4-2 mawk=1.3.4.20200120-2 media-types=4.0.0 ncurses-base=6.3-1 ncurses-bin=6.3-1 netbase=6.3 openssl=1.1.1l-1 passwd=1:4.8.1-2 patch=2.7.6-7 patchutils=0.4.2-1 perl=5.32.1-6 perl-base=5.32.1-6 perl-modules-5.32=5.32.1-6 perl-openssl-defaults=5 pinentry-curses=1.1.0-4 po-debconf=1.0.21+nmu1 python3=3.9.8-1 python3-minimal=3.9.8-1 python3.9=3.9.9-1 python3.9-minimal=3.9.9-1 rake=13.0.3-1 readline-common=8.1-2 rpcsvc-proto=1.4.2-4 ruby=1:2.7.6 ruby-all-dev=1:2.7.6 ruby-ast=2.4.1-1 ruby-diff-lcs=1.4.4-1 ruby-minitest=5.13.0-1 ruby-net-telnet=0.1.1-2 ruby-power-assert=1.1.7-2 ruby-rspec=3.10.0c1e1m2s3-1 ruby-rspec-core=3.10.0c1e1m2s3-1 ruby-rspec-expectations=3.10.0c1e1m2s3-1 ruby-rspec-mocks=3.10.0c1e1m2s3-1 ruby-rspec-support=3.10.0c1e1m2s3-1 ruby-rubygems=3.2.27-3 ruby-test-unit=3.3.9-1 ruby-whitequark-parser=3.0.2.0-1 ruby-xmlrpc=0.3.2-1 ruby2.7=2.7.4-1+b1 ruby2.7-dev=2.7.4-1+b1 ruby3.0=3.0.2-5 ruby3.0-dev=3.0.2-5 rubygems-integration=1.18 sed=4.8-1 sensible-utils=0.0.17 sysvinit-utils=3.00-1 tar=1.34+dfsg-1 tzdata=2021e-1 util-linux=2.37.2-4 wdiff=1.2.2-2+b1 xz-utils=5.2.5-2 zlib1g=1:1.2.11.dfsg-2 --variant=apt --aptopt=Acquire::Check-Valid-Until "false" --aptopt=Acquire::http::Dl-Limit "1000"; --aptopt=Acquire::https::Dl-Limit "1000"; --aptopt=Acquire::Retries "5"; --aptopt=APT::Get::allow-downgrades "true"; --keyring=/usr/share/keyrings/ --essential-hook=chroot "$1" sh -c "apt-get --yes install fakeroot util-linux" --essential-hook=copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ --essential-hook=chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211208T150139Z/ unstable main deb-src http://snapshot.notset.fr/archive/debian/20211208T150139Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211210T151944Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211205T210857Z/ unstable main' >> /etc/apt/sources.list && apt-get update" --customize-hook=chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash --customize-hook=chroot "$1" env sh -c "apt-get source --only-source -d ruby-rubocop-ast=0.6.0-1 && mkdir -p /build/ruby-rubocop-ast-p6bplW && dpkg-source --no-check -x /*.dsc /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0 && chown -R builduser:builduser /build/ruby-rubocop-ast-p6bplW" --customize-hook=chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1638961432" dpkg-buildpackage -uc -a amd64 --build=all" --customize-hook=sync-out /build/ruby-rubocop-ast-p6bplW /tmp/ruby-rubocop-ast-0.6.0-1nf4r9aaw bookworm /dev/null deb http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable main I: automatically chosen mode: root I: chroot architecture amd64 is equal to the host's architecture I: automatically chosen format: tar I: using /tmp/mmdebstrap.jtLfqhnLCj as tempdir I: running apt-get update... I: downloading packages with apt... I: extracting archives... I: installing essential packages... I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "apt-get --yes install fakeroot util-linux"' exec /tmp/mmdebstrap.jtLfqhnLCj Reading package lists... Building dependency tree... util-linux is already the newest version (2.37.2-4). The following NEW packages will be installed: fakeroot libfakeroot 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 134 kB of archives. After this operation, 397 kB of additional disk space will be used. Get:1 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable/main amd64 libfakeroot amd64 1.26-1 [47.3 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable/main amd64 fakeroot amd64 1.26-1 [87.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 134 kB in 0s (1000 kB/s) Selecting previously unselected package libfakeroot:amd64. (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 ... 4673 files and directories currently installed.) Preparing to unpack .../libfakeroot_1.26-1_amd64.deb ... Unpacking libfakeroot:amd64 (1.26-1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../fakeroot_1.26-1_amd64.deb ... Unpacking fakeroot (1.26-1) ... Setting up libfakeroot:amd64 (1.26-1) ... Setting up fakeroot (1.26-1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Processing triggers for libc-bin (2.32-5) ... I: running special hook: copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211208T150139Z/ unstable main deb-src http://snapshot.notset.fr/archive/debian/20211208T150139Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211210T151944Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211205T210857Z/ unstable main' >> /etc/apt/sources.list && apt-get update"' exec /tmp/mmdebstrap.jtLfqhnLCj Get:1 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable InRelease [165 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211210T151944Z unstable InRelease [165 kB] Hit:3 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable InRelease Ign:4 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main amd64 Packages Get:4 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main Sources [12.5 MB] Get:5 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main amd64 Packages [12.0 MB] Ign:6 http://snapshot.notset.fr/archive/debian/20211210T151944Z unstable/main amd64 Packages Err:6 http://snapshot.notset.fr/archive/debian/20211210T151944Z unstable/main amd64 Packages 404 Not Found [IP: 10.13.0.253 80] Ign:6 http://snapshot.notset.fr/archive/debian/20211210T151944Z unstable/main amd64 Packages Get:6 http://snapshot.notset.fr/archive/debian/20211210T151944Z unstable/main amd64 Packages [12.0 MB] Fetched 36.8 MB in 30s (1217 kB/s) Reading package lists... I: installing remaining packages inside the chroot... I: running --customize-hook in shell: sh -c 'chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash' exec /tmp/mmdebstrap.jtLfqhnLCj I: running --customize-hook in shell: sh -c 'chroot "$1" env sh -c "apt-get source --only-source -d ruby-rubocop-ast=0.6.0-1 && mkdir -p /build/ruby-rubocop-ast-p6bplW && dpkg-source --no-check -x /*.dsc /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0 && chown -R builduser:builduser /build/ruby-rubocop-ast-p6bplW"' exec /tmp/mmdebstrap.jtLfqhnLCj Reading package lists... NOTICE: 'ruby-rubocop-ast' packaging is maintained in the 'Git' version control system at: https://salsa.debian.org/ruby-team/ruby-rubocop-ast.git Please use: git clone https://salsa.debian.org/ruby-team/ruby-rubocop-ast.git to retrieve the latest (possibly unreleased) updates to the package. Need to get 98.5 kB of source archives. Get:1 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main ruby-rubocop-ast 0.6.0-1 (dsc) [2161 B] Get:2 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main ruby-rubocop-ast 0.6.0-1 (tar) [93.4 kB] Get:3 http://snapshot.notset.fr/archive/debian/20211208T150139Z unstable/main ruby-rubocop-ast 0.6.0-1 (diff) [2972 B] Fetched 98.5 kB in 0s (1398 kB/s) Download complete and in download only mode W: Download is performed unsandboxed as root as file 'ruby-rubocop-ast_0.6.0-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) dpkg-source: info: extracting ruby-rubocop-ast in /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0 dpkg-source: info: unpacking ruby-rubocop-ast_0.6.0.orig.tar.gz dpkg-source: info: unpacking ruby-rubocop-ast_0.6.0-1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 0001-gemspec-drop-git-usage.patch I: running --customize-hook in shell: sh -c 'chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1638961432" dpkg-buildpackage -uc -a amd64 --build=all"' exec /tmp/mmdebstrap.jtLfqhnLCj dpkg-buildpackage: info: source package ruby-rubocop-ast dpkg-buildpackage: info: source version 0.6.0-1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Daniel Leidert dpkg-source --before-build . debian/rules clean dh clean --buildsystem=ruby --with ruby dh_auto_clean -O--buildsystem=ruby dh_ruby --clean dh_ruby --clean dh_autoreconf_clean -O--buildsystem=ruby dh_clean -O--buildsystem=ruby debian/rules binary-indep dh binary-indep --buildsystem=ruby --with ruby dh_update_autotools_config -i -O--buildsystem=ruby dh_autoreconf -i -O--buildsystem=ruby dh_auto_configure -i -O--buildsystem=ruby dh_ruby --configure dh_auto_build -i -O--buildsystem=ruby dh_ruby --build dh_ruby --build dh_auto_test -i -O--buildsystem=ruby dh_ruby --test create-stamp debian/debhelper-build-stamp dh_testroot -i -O--buildsystem=ruby dh_prep -i -O--buildsystem=ruby dh_auto_install --destdir=debian/ruby-rubocop-ast/ -i -O--buildsystem=ruby dh_ruby --install /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast dh_ruby --install /usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20211211-1825544-47uxol/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on parser (>= 2.7.1.5) is not recommended if parser is semantically versioned, use: add_runtime_dependency 'parser', '~> 2.7', '>= 2.7.1.5' WARNING: See https://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: rubocop-ast Version: 0.6.0 File: rubocop-ast-0.6.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/d20211211-1825544-47uxol/rubocop-ast-0.6.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop-ast.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/builder.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/ext/range.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/ext/set.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/alias_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/and_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/args_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/array_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/block_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/break_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/case_match_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/case_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/class_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/const_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/def_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/defined_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/ensure_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/float_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/for_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/forward_args_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/hash_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/if_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/index_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/indexasgn_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/int_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/keyword_splat_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/lambda_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/basic_literal_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/binary_operator_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/collection_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/conditional_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/hash_element_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/modifier_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/numeric_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/parameterized_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/mixin/predicate_operator_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/module_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/next_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/or_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/pair_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/range_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/regexp_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/resbody_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/rescue_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/return_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/self_class_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/send_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/str_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/super_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/symbol_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/until_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/when_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/while_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node/yield_node.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/node_pattern.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/processed_source.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/rubocop_compatibility.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/sexp.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/token.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/traversal.rb /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all/gems/rubocop-ast-0.6.0/lib/rubocop/ast/version.rb Successfully installed rubocop-ast-0.6.0 1 gem installed cd debian/ruby-rubocop-ast/usr/share/rubygems-integration/all rm -rf bin rm -rf build_info rm -rf cache rm -rf doc rm -rf extensions rmdir plugins cd gems/rubocop-ast-0.6.0 rm -f chmod 644 lib/rubocop-ast.rb lib/rubocop/ast.rb lib/rubocop/ast/builder.rb lib/rubocop/ast/ext/range.rb lib/rubocop/ast/ext/set.rb lib/rubocop/ast/node.rb lib/rubocop/ast/node/alias_node.rb lib/rubocop/ast/node/and_node.rb lib/rubocop/ast/node/args_node.rb lib/rubocop/ast/node/array_node.rb lib/rubocop/ast/node/block_node.rb lib/rubocop/ast/node/break_node.rb lib/rubocop/ast/node/case_match_node.rb lib/rubocop/ast/node/case_node.rb lib/rubocop/ast/node/class_node.rb lib/rubocop/ast/node/const_node.rb lib/rubocop/ast/node/def_node.rb lib/rubocop/ast/node/defined_node.rb lib/rubocop/ast/node/ensure_node.rb lib/rubocop/ast/node/float_node.rb lib/rubocop/ast/node/for_node.rb lib/rubocop/ast/node/forward_args_node.rb lib/rubocop/ast/node/hash_node.rb lib/rubocop/ast/node/if_node.rb lib/rubocop/ast/node/index_node.rb lib/rubocop/ast/node/indexasgn_node.rb lib/rubocop/ast/node/int_node.rb lib/rubocop/ast/node/keyword_splat_node.rb lib/rubocop/ast/node/lambda_node.rb lib/rubocop/ast/node/mixin/basic_literal_node.rb lib/rubocop/ast/node/mixin/binary_operator_node.rb lib/rubocop/ast/node/mixin/collection_node.rb lib/rubocop/ast/node/mixin/conditional_node.rb lib/rubocop/ast/node/mixin/hash_element_node.rb lib/rubocop/ast/node/mixin/method_dispatch_node.rb lib/rubocop/ast/node/mixin/method_identifier_predicates.rb lib/rubocop/ast/node/mixin/modifier_node.rb lib/rubocop/ast/node/mixin/numeric_node.rb lib/rubocop/ast/node/mixin/parameterized_node.rb lib/rubocop/ast/node/mixin/predicate_operator_node.rb lib/rubocop/ast/node/module_node.rb lib/rubocop/ast/node/next_node.rb lib/rubocop/ast/node/or_node.rb lib/rubocop/ast/node/pair_node.rb lib/rubocop/ast/node/range_node.rb lib/rubocop/ast/node/regexp_node.rb lib/rubocop/ast/node/resbody_node.rb lib/rubocop/ast/node/rescue_node.rb lib/rubocop/ast/node/return_node.rb lib/rubocop/ast/node/self_class_node.rb lib/rubocop/ast/node/send_node.rb lib/rubocop/ast/node/str_node.rb lib/rubocop/ast/node/super_node.rb lib/rubocop/ast/node/symbol_node.rb lib/rubocop/ast/node/until_node.rb lib/rubocop/ast/node/when_node.rb lib/rubocop/ast/node/while_node.rb lib/rubocop/ast/node/yield_node.rb lib/rubocop/ast/node_pattern.rb lib/rubocop/ast/processed_source.rb lib/rubocop/ast/rubocop_compatibility.rb lib/rubocop/ast/sexp.rb lib/rubocop/ast/token.rb lib/rubocop/ast/traversal.rb lib/rubocop/ast/version.rb find lib/ -type d -empty -delete cd - cd - dh_installchangelogs -pruby-rubocop-ast /build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/CHANGELOG.md upstream /usr/bin/ruby2.7 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby2.7 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all:/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -e gem\ \"rubocop-ast\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby2.7 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all:/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake /usr/bin/ruby2.7 -ruri -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation Randomized with seed 42950 RuboCop::AST::Node #pure? for an ivar assignment returns false for a hash literal with only literal children returns true which contains a method call returns false for a cvar assignment returns false for an integer literal returns true for an lvar assignment returns false for a method call returns false for a module definition returns false for an array literal with only literal children returns true which contains a method call returns false for a regexp with no interpolation returns true with options returns true with interpolated segments 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 class definition returns false for a gvar assignment returns false #class_definition? with Struct matches without inheritance matches with self singleton class matches with Class.new matches with object singleton class matches namespaced class matches with inheritance matches with ::ClassName matches constant defined as Struct without block does not match #struct_constructor? struct definition with a block matches ::Struct matches struct definition without block does not match #recursive_basic_literal? behaves like literal returns true for `%r{abx}ixo` behaves like literal returns true for `{ :a => 1, :b => 2 }` behaves like literal returns true for `'str'` 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]` behaves like literal returns true for `1.0` behaves like literal returns true for `nil` behaves like literal returns true for `"#{2}"` behaves like literal returns true for `(1)` behaves like literal returns true for `1` behaves like non literal returns false for `some_method_call(x, y)` behaves like literal returns true for `(false && true)` behaves like non literal returns false for `%r{abx#{foo}}ixo` behaves like literal returns true for `(false <=> true)` 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 `/./` behaves like non literal returns false for `/.#{some_method_call}/` behaves like non literal returns false for `{ :sym => some_method_call }` behaves like non literal returns false for `{ some_method_call => :sym }` behaves like literal returns true for `!true` behaves like non literal returns false for `(x or false)` behaves like literal returns true for `(false or true)` behaves like literal returns true for `[1, 2, 3]` behaves like literal returns true for `false` sibling_access returns trivial values for a root node for a single child returns the expected values for a node with siblings returns the expected values #argument_type? method arguments returns true for all argument types block arguments returns true for all argument types #value_used? within an array literal at the top level is always false assigned to an ivar is always true within a method call node is always true within a while node is true only for the condition within a module definition node is always true within a singleton class node is always true at the end of a block is always true within a class definition node is always true within an if...else..end node at the top level is true only for the condition nested in a method call is always true at the top level is false #module_definition? with Module.new matches included module definition matches namespaced modules matches using module keyword matches prepend Module.new matches with ::ModuleName matches nested modules 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 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::RegexpNode #extended? with no options is expected to equal false with only x option is expected to equal true with other options is expected to equal false with x and other options is expected to equal true #ignore_case? 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 with no options is expected to equal false #interpolation? with regexp quote is expected to eq true with direct variable interpoation is expected to eq true with no interpolation returns false is expected to eq false .new is expected to equal true #content with an empty regexp is expected to eq "" with a regexp without 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 an empty regexp with option is expected to eq "" with a multi-line regexp with option is expected to eq "\n.+\n" #no_encoding? with no options is expected to equal false with only n option is expected to equal true with other options is expected to equal false with n and other options is expected to equal true #single_interpolation? with other options is expected to equal false with no options is expected to equal false with only o option is expected to equal true with o and other options is expected to equal true #regopt 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 regexp without option is expected to equal true is expected to equal true with a multi-line regexp without option is expected to equal true is expected to equal true with an empty regexp with option is expected to equal true is expected to eq [:i, :x] with a multi-line regexp with option is expected to equal true is expected to eq [:i, :m, :x] #to_regexp with a regexp without option is expected to eq /.+/ with an empty regexp with option is expected to eq //ix with a regexp with option is expected to eq /.+/mix with a multi-line regexp with option is expected to eq / .+ /ix with an empty regexp is expected to eq // with a regexp with an "o" option is expected to eq "/abc/i" with a multi-line regexp without option is expected to eq / .+ / #slash_literal? with %r<-delimiters is expected to eq false with /-delimiters is expected to eq true with %r/-delimiters is expected to eq false with %r{-delimiters is expected to eq false with multi-line %r{-delimiters is expected to eq false #percent_r_literal? with %r<-delimiters is expected to eq true with %r{-delimiters is expected to eq true with multi-line %r{-delimiters is expected to eq true with /-delimiters is expected to eq false with %r/-delimiters is expected to eq true #options with an empty regexp is expected to eq 0 with a regexp without option is expected to eq 0 with a regexp with multiple options is expected to eq 3 with a regexp with single option is expected to eq 1 with a regexp with "o" option is expected to eq 0 #delimiters with %r<-delimiters is expected to eq ["<", ">"] with multi-line %r{-delimiters is expected to eq ["{", "}"] with %r{-delimiters is expected to eq ["{", "}"] with /-delimiters is expected to eq ["/", "/"] with %r/-delimiters is expected to eq ["/", "/"] #multiline_mode? 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 with only m option is expected to equal true #delimiter? with /-delimiters is expected to eq false is expected to eq true with %r/-delimiters is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq false with multi-line %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 true is expected to eq false 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 true is expected to eq false is expected to eq false is expected to eq false with %r<-delimiters is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq false RuboCop::AST::UntilNode #keyword is expected to eq "until" #inverse_keyword is expected to eq "while" .new with a modifier until is expected to equal true with a statement until is expected to equal true #loop_keyword? with a modifier until is expected to be truthy with a statement 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 #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey RuboCop::AST::ClassNode #parent_class when a parent class is specified is expected to equal true when no parent class is specified is expected to equal nil #body with an empty body is expected to equal nil with a multi-expression body is expected to equal true with a single expression body is expected to equal true .new is expected to equal true #identifier is expected to equal true RuboCop::AST::SelfClassNode #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 #identifier is expected to equal true .new is expected to equal true RuboCop::AST::WhileNode #keyword is expected to eq "while" #loop_keyword? with a statement while is expected to be truthy with a modifier while is expected to be truthy .new with a modifier while is expected to equal true with a statement while is expected to equal true #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey #inverse_keyword is expected to eq "until" #post_condition_loop? with a statement while is expected to be falsey with a modifier while is expected to be truthy RuboCop::AST::OrNode #lhs with a semantic or node is expected to equal true with a logical or node is expected to equal true #logical_operator? with a logical or node is expected to equal true with a semantic or node is expected to equal false #rhs with a semantic or node is expected to equal true with a logical or node is expected to equal true #operator with a logical or node is expected to eq "||" with a semantic or node is expected to eq "or" #alternate_operator with a logical or node is expected to eq "or" with a semantic or node is expected to eq "||" .new with a semantic or node is expected to equal true with a logical or node is expected to equal true #semantic_operator? with a logical or node is expected to equal false with a semantic or node is expected to equal true #inverse_operator with a semantic or node is expected to eq "and" with a logical or node is expected to eq "&&" RuboCop::AST::SymbolNode .new with a symbol node is expected to equal true #value is expected to eq :foo RuboCop::AST::ProcessedSource #parser_error when the source was properly parsed is nil when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII is nil when the source could not be parsed due to encoding error returns the error #path is the path passed to .new #lines has same number of elements as line count is an array contains lines as string without linefeed #first_token_of accepts Node as an argument returns first token for node #buffer is a source buffer #comments is an array of comments when the source is invalid returns [] token enumerables #find_token yields correct token yields nil when there is no match #each_token yields all tokens #last_token_of accepts Node as an argument returns last token for node valid_syntax? when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI returns true when the source is invalid returns false when the source is valid but has some warning diagnostics returns true when the source is completely valid returns true when a line starts with an integer literal tokenizes the source correctly when the source could not be parsed due to encoding error returns false #blank? with source with content returns false with source of no content returns true #preceding_line returns source of line before token #tokens_within returns tokens for node accepts Node as an argument when heredoc as argument is present returns tokens for node after heredoc returns tokens for node before heredoc returns tokens for heredoc node #start_with? with present source returns false when passed string that does not start source returns true when passed string that starts source with blank source returns false #ast is the root node of AST #following_line returns source of line after token #file_path returns file path #tokens has an array of tokens #[] 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 .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 with heavily commented source #find_comment yields correct comment yields nil when there is no match #line_with_comment? returns true for lines with comments returns false for lines without comments #each_comment yields all comments #contains_comment? provided source_range on line without comment is expected to equal false provided source_range on line with comment is expected to equal true provided a multiline source_range with at least one line with comment is expected to equal true provided source_range on comment line is expected to equal true #comment_at_line returns the comment at the given line number returns nil if line has no comment #comments_before_line returns comments on or before given line #each_comment_in_lines yields the comments RuboCop::AST::DefinedNode #receiver is expected to eq nil #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 RuboCop::AST::NextNode behaves like wrapped arguments node #arguments with a single splat argument is expected to eq 1 with a single argument is expected to eq 1 with a single argument and braces is expected to eq 1 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true with no arguments and braces is expected to equal true .new with arguments is expected to equal true without arguments is expected to equal true RuboCop::AST::SendNode #post_condition_loop? is expected to equal false #receiver with no receiver is expected to equal true with a literal receiver is expected to equal true with a variable receiver is expected to equal true #negation_method? with prefix bang is expected to be truthy with a non-negated method is expected to be falsey with prefix `not` is expected to be truthy with suffix `not` is expected to be falsey #nonmutating_binary_operator_method? with a mutating binary operator method is expected to be falsey with a regular method is expected to be falsey with a nonmutating binary operator method is expected to be truthy #non_bare_access_modifier? when node is not an access modifier is expected to be falsey 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 #operator_method? with a regular method is expected to be falsey with a setter method is expected to be falsey with a unary operator method is expected to be truthy with a binary operator method is expected to be truthy #splat_argument? with no arguments is expected to be falsey with a splat argument is expected to be truthy with regular arguments is expected to be falsey with mixed arguments is expected to be truthy #command? when argument is a symbol with an explicit receiver is expected to be falsey with an implicit receiver is expected to be truthy when argument is a string with an explicit receiver is expected to be falsey with an implicit receiver 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 no arguments is expected to equal true with a single splat argument is expected to eq 1 #first_argument with multiple mixed arguments is expected to equal true with a single literal argument is expected to equal true with a single splat argument is expected to equal true with no arguments is expected to equal true with multiple literal arguments is expected to equal true #unary_operation? with a regular method call is expected to equal false with a unary operation is expected to equal true with a binary operation is expected to equal false with an implicit call method is expected to equal false #self_receiver? with a self receiver is expected to be truthy with a non-self receiver is expected to be falsey with an implicit receiver is expected to be falsey #const_receiver? with a self receiver is expected to be falsey with a constant receiver is expected to be truthy with a non-constant receiver is expected to be falsey #double_colon? with a double colon is expected to be truthy with a dot is expected to be falsey without a dot is expected to be falsey with a unary method is expected to be falsey #implicit_call? with a regular method is expected to be falsey with an explicit call method is expected to be falsey with an implicit call method is expected to be truthy #comparison_method? with a regular method is expected to be falsey with a negation method is expected to be falsey with a comparison method is expected to be truthy #nonmutating_hash_method? with a mutating Hash method is expected to be falsey with a nonmutating Hash method is expected to be truthy with a regular method is expected to be falsey #def_modifier? with a prefixed def modifier is expected to be truthy with several prefixed def modifiers is expected to be truthy #block_node with a block literal is expected to equal true with a block argument is expected to equal true with no block is expected to equal true #access_modifier? when node is not an access modifier is expected to be falsey when node is a non-bare `module_function` is expected to be truthy when node is a bare `module_function` is expected to be truthy #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 #bang_method? with a predicate method is expected to be falsey with a regular method is expected to be falsey with a bang method is expected to be truthy #macro? with a receiver when parent is a class is expected to be falsey when parent is a module is expected to be falsey without a receiver when parent is a singleton class is expected to be truthy when in the global scope 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 block not in a macro scope is expected to be falsey when parent is a class constructor is expected to be truthy when in an if is expected to be truthy when parent is a block in a macro scope is expected to be truthy when parent is a method definition is expected to be falsey when the condition of an if is expected to be falsey when parent is a class is expected to be truthy when parent is a keyword begin inside of an class is expected to be truthy without a parent is expected to be truthy #nonmutating_string_method? with a regular method is expected to be falsey with a nonmutating String method is expected to be truthy with a mutating String method is expected to be falsey #arithmetic_operation? with a regular method call is expected to be falsey with a unary numeric operation is expected to be falsey with a binary arithmetic operation is expected to be truthy #prefix_bang? with keyword `not` is expected to be falsey with a bang method is expected to be truthy with a non-negated method is expected to be falsey .new with a safe navigation method send is expected to equal true with a regular method send is expected to equal true #assignment_method? with a bracket assignment method is expected to be truthy with a comparison method is expected to be falsey with an assignment method is expected to be truthy with a regular method is expected to be falsey #enumerable_method? with a regular method is expected to be falsey with an enumerable method is expected to be truthy #last_argument with no arguments is expected to equal true with multiple mixed arguments is expected to equal true with multiple literal arguments is expected to equal true with a single splat argument is expected to equal true with a single literal argument is expected to equal true #block_argument? with no arguments is expected to be falsey with a block argument is expected to be truthy with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #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 #camel_case_method? with a camel case method is expected to be truthy with a regular method is expected to be falsey #lambda? with a stabby lambda method is expected to be truthy with a non-lambda method is expected to be falsey with a lambda method is expected to be truthy with a method named lambda in a class is expected to be falsey #predicate_method? with a predicate method is expected to be truthy with a regular method is expected to be falsey with a bang method is expected to be falsey #loop_keyword? is expected to equal false #method_name 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 :== with an implicit call method is expected to eq :call #bare_access_modifier? 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 `module_function` 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 #block_literal? with a block argument is expected to be falsey with no block is expected to be falsey with a block literal is expected to be truthy #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 #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 #lambda_literal? with `a.() {}` style method is expected to be falsey with a non-lambda method is expected to be falsey with a stabby lambda is expected to equal true with a lambda method is expected to equal false #nonmutating_operator_method? with a nonmutating unary operator method is expected to be truthy with a mutating binary operator method is expected to be falsey with a regular method is expected to be falsey with a nonmutating binary operator method is expected to be truthy #arguments? with multiple mixed arguments is expected to be truthy with multiple literal arguments is expected to be truthy with a single splat argument is expected to be truthy with a single literal argument is expected to be truthy with no arguments is expected to be falsey #dot? 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 without a dot is expected to be falsey #binary_operation?? with an implicit call method is expected to equal false with a binary operation is expected to equal true with a regular method call is expected to equal false with a unary operation is expected to equal false #setter_method? with an indexed setter method is expected to be truthy with an operator method is expected to be falsey with a setter method is expected to be truthy with a regular method is expected to be falsey #nonmutating_unary_operator_method? with a regular method is expected to be falsey with a nonmutating unary operator method is expected to be truthy RuboCop::AST::KeywordSplatNode .new is expected to equal true #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 #hash_rocket? is expected to be falsey #key is expected to eq s(:kwsplat, s(:send, nil, :foo)) #key_delta with alignment set to :left when using hash rocket delimiters when keyword splat is ahead is expected to eq 2 when keyword splat is aligned is expected to eq 0 when keyword splat is behind is expected to eq -2 when keyword splat is on the same line is expected to eq 0 when using colon delimiters when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 2 when keyword splat is behind is expected to eq -2 when keyword splat is aligned is expected to eq 0 with alignment set to :right when using colon delimiters when keyword splat is behind is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is aligned is expected to eq 0 when keyword splat is ahead is expected to eq 0 when using hash rocket delimiters when keyword splat is behind is expected to eq 0 when keyword splat is aligned is expected to eq 0 when keyword splat is on the same line 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)) #operator is expected to eq "**" #value_delta when using colon delimiters when keyword splat is left aligned is expected to eq 0 when keyword splat is behind is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when using hash rocket delimiters when keyword splat is left aligned is expected to eq 0 when keyword splat is 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 RuboCop::AST::WhenNode #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 eq 3 is expected to all be literal #branch_index is expected to eq 1 is expected to eq 2 is expected to eq 0 #then? without a then keyword is expected to be falsey with a then keyword is expected to be truthy .new is expected to equal true #body with a then keyword is expected to equal true without a then keyword is expected to equal true RuboCop::AST::ArgsNode #empty_and_without_delimiters? with delimiters with a method definition is expected to equal false with a block is expected to equal false with a lambda literal is expected to equal false with arguments with a method definition is expected to equal false with a lambda literal is expected to equal false with empty arguments with a lambda literal is expected to equal true with a block is expected to equal true with a method definition is expected to equal true .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 RuboCop::AST::LambdaNode #receiver is expected to eq nil #method_name is expected to eq :lambda #arguments is expected to eq 2 RuboCop::AST::BreakNode behaves like wrapped arguments node .new with arguments is expected to equal true without arguments is expected to equal true #arguments with a single argument and braces is expected to eq 1 with a single 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 no arguments and braces is expected to equal true with multiple literal arguments is expected to eq 2 RuboCop::AST::ResbodyNode #branch_index is expected to eq 1 is expected to eq 0 is expected to eq 2 #exception_variable when an exception variable is not given is expected to equal nil for an implicit rescue is expected to eq "ex" for an explicit rescue is expected to eq "ex" .new is expected to equal true #body is expected to equal true #exceptions without exception is expected to eq 0 with multiple exceptions is expected to all be const type is expected to eq 2 with a single exception is expected to eq 1 is expected to all be const type RuboCop::AST::PairNode #key_delta with alignment set to :right when using hash rocket delimiters when keys are aligned when both keys are explicit keys is expected to eq 0 when second key is a keyword splat is expected to eq 0 when receiver key is behind when 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 when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when using colon delimiters when 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 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 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 both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 with alignment set to :left when using colon delimiters when receiver key is ahead when second pair is a keyword splat is expected to eq 2 when both pairs are explicit pairs is expected to eq 2 when both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is behind when both pairs are reail pairs is expected to eq -2 when second pair is a keyword splat is expected to eq -2 when keys are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when 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 both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is behind when both pairs are explicit pairs is expected to eq -2 when second pair is a keyword splat is expected to eq -2 when keys are aligned when second key is a keyword splat is expected to eq 0 when both keys are explicit keys is expected to eq 0 #colon? when using a colon delimiter is expected to be truthy when using a hash rocket delimiter is expected to be falsey #same_line? when a multiline pair shares the same line when both pairs are explicit pairs is expected to be truthy is expected to be truthy when last pair is a keyword splat is expected to be truthy is expected to be truthy when pairs are on separate lines when both pairs are explicit pairs is expected to be falsey when last pair is a keyword splat is expected to be falsey when both pairs are on the same line when both pairs are explicit pairs is expected to be truthy when both pair is a keyword splat is expected to be truthy #hash_rocket? when using a colon delimiter is expected to be falsey when using a hash rocket delimiter is expected to be truthy #key when using a symbol key is expected to equal true when using a string key is expected to equal true #delimiter when using a hash rocket delimiter is expected to eq "=>" is expected to eq " => " when using a colon delimiter is expected to eq ": " is expected to eq ":" #inverse_delimiter when using a colon delimiter is expected to eq " => " is expected to eq "=>" when using a hash rocket delimiter is expected to eq ": " is expected to eq ":" #value is expected to equal true #value_delta when using hash rocket delimiters when receiver value is behind is expected to eq -2 when both pairs are on the same line is expected to eq 0 when values are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver value is ahead is expected to eq 2 when using colon delimiters when values are aligned when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver value is ahead is expected to eq 2 when both pairs are on the same line is expected to eq 0 when receiver value is behind is expected to eq -2 #value_on_new_line? when value starts on a new line is expected to be truthy when value spans multiple lines is expected to be falsey when pair is on a single line is expected to be falsey .new is expected to equal true RuboCop::AST::RangeNode .new with an infinite range is expected to equal true is expected to equal true with a beignless range is expected to equal true is expected to equal true with an exclusive range is expected to equal true is expected to equal true with an inclusive range is expected to equal true is expected to equal true RuboCop::AST::DefNode #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= #first_argument with multiple regular arguments is expected to equal true with a single regular argument is expected to equal true with a single keyword argument is expected to equal true with multiple mixed arguments is expected to equal true with a single rest argument is expected to equal true with no arguments is expected to equal true when using Ruby 2.7 or newer #argument_forwarding? is expected to be truthy #method? when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy #comparison_method? with a regular method is expected to be falsey with a comparison method is expected to be truthy #assignment_method? with a regular method is expected to be falsey with a comparison method is expected to be falsey with a bracket assignment method is expected to be truthy with an assignment method is expected to be truthy #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 #const_receiver? with a singleton method definition is expected to be truthy with a class method definition is expected to be falsey with an instance method definition is expected to be falsey #operator_method? with a setter 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 regular method is expected to be falsey #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 #arguments with multiple regular arguments is expected to eq 2 with argument forwarding is expected to eq 1 with no arguments is expected to equal true with a single regular argument is expected to eq 1 with a single rest argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 #block_argument? with no arguments is expected to be falsey with a block argument is expected to be truthy with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #last_argument with a single rest argument is expected to equal true with multiple regular arguments is expected to equal true with a single regular argument is expected to equal true with a single keyword argument is expected to equal true with multiple mixed arguments is expected to equal true with no arguments is expected to equal true #self_receiver? with a class method definition is expected to be truthy with a singleton method definition is expected to be falsey with an instance method definition is expected to be falsey .new with a def node is expected to equal true with a defs node is expected to equal true #void_context? with a bracket assignment method is expected to be truthy with a regular method is expected to be falsey with a regular assignment method is expected to be truthy with an initializer method is expected to be truthy with a comparison method is expected to be falsey #arguments? with a single regular argument is expected to be truthy with multiple regular arguments is expected to be truthy with no arguments is expected to be falsey with a single rest argument is expected to be truthy with a single keyword argument is expected to be truthy with multiple mixed arguments is expected to be truthy #rest_argument? with mixed arguments is expected to be truthy with no arguments is expected to be falsey with regular arguments is expected to be falsey with a rest argument is expected to be truthy #receiver with a class method definition is expected to equal true with a singleton method definition is expected to equal true with an instance method definition is expected to equal true #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 #camel_case_method? with a regular method is expected to be falsey with a camel case method is expected to be truthy RuboCop::AST::EnsureNode .new is expected to equal true #body is expected to equal true RuboCop::AST::RescueNode .new is expected to equal true #branches when there is an else returns all the bodies with an empty else returns all the bodies when there is no else keyword returns only then rescue bodies #body is expected to equal true #resbody_branches is expected to all be resbody type is expected to eq 2 #else? without an else statement is expected to be falsey with an else statement is expected to be truthy #else_branch without an else statement is expected to equal true with an else statement is expected to equal true RuboCop::AST::BlockNode #arguments? with multiple mixed arguments is expected to be truthy with a single splat argument is expected to be truthy with a single argument is expected to be truthy >= Ruby 2.7 using numbered parameters is expected to equal false with no arguments is expected to be falsey #keywords? when enclosed in braces is expected to be falsey when enclosed in do-end keywords is expected to be truthy #arguments with multiple mixed arguments is expected to eq 2 with no arguments is expected to equal true >= Ruby 2.7 using numbered parameters is expected to equal true with a single literal argument is expected to eq 1 with a single splat argument is expected to eq 1 #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" #braces? when enclosed in do-end keywords is expected to be falsey when enclosed in braces is expected to be truthy #delimiters when enclosed in do-end keywords is expected to eq ["do", "end"] when enclosed in braces is expected to eq ["{", "}"] .new is expected to equal true #void_context? when block method is not each is expected to be falsey when block method is tap is expected to be truthy when block method is each is expected to be truthy #closing_delimiter when enclosed in do-end keywords is expected to eq "end" when enclosed in braces is expected to eq "}" #multiline? when block is on a single line is expected to be falsey when block is on several lines is expected to be truthy #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 RuboCop::AST::ForNode .new is expected to equal true #body is expected to equal true #loop_keyword? is expected to be truthy #keyword is expected to eq "for" #variable is expected to equal true #void_context? with a do keyword is expected to be truthy without a do keyword is expected to be truthy #post_condition_loop? is expected to be falsey #do? without a do keyword is expected to be falsey with a do keyword is expected to be truthy #collection is expected to equal true RuboCop::AST::FloatNode #sign? explicit negative float is expected to be truthy explicit positive float is expected to be truthy .new is expected to be truthy #value is expected to eq 1.5 RuboCop::AST::YieldNode #command? when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy #assignment_method? is expected to be falsey #macro? is expected to be falsey #receiver is expected to equal true #predicate_method? is expected to be falsey #bang_method? is expected to be falsey #operator_method? is expected to be falsey #parenthesized? with no arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy with arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy #setter_method? is expected to be falsey #splat_argument? 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 with no arguments is expected to be falsey .new is expected to equal true #method_name is expected to eq :yield #double_colon? is expected to be falsey #dot? is expected to be falsey #method? when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy #implicit_call? is expected to be falsey #first_argument with no arguments is expected to equal true with a single literal argument is expected to equal true with multiple literal arguments is expected to equal true with a single splat argument is expected to equal true with multiple mixed arguments is expected to equal true #self_receiver? is expected to be falsey #const_receiver? is expected to be falsey #block_argument? is expected to be falsey #arguments? with multiple literal arguments is expected to be truthy with multiple mixed 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 a single splat argument is expected to be truthy #last_argument with no arguments is expected to equal true 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 a single splat argument is expected to equal true #block_node is expected to equal true #block_literal? is expected to be falsey #camel_case_method? is expected to be falsey #comparison_method? is expected to be falsey #arguments with a single splat argument is expected to eq 1 with a single literal argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true with multiple mixed arguments is expected to eq 2 RuboCop::AST::HashNode #pairs with an empty hash is expected to equal true with a hash of literals is expected to eq 3 is expected to all be pair type with a hash of variables is expected to all be pair type is expected to eq 2 .new is expected to equal true #pairs_on_same_line? with no pairs on the same line is expected to be falsey with some pairs on the same line is expected to be truthy with all pairs on the same line is expected to be truthy #each_value when not passed a block is expected to equal true when passed a block yields all the pairs #each_key when not passed a block is expected to equal true when passed a block yields all the pairs #empty? with an empty hash is expected to equal true with a hash containing a keyword splat is expected to equal false with a hash containing pairs is expected to equal false #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 hash with symbol keys is expected to eq 3 is expected to all be sym type #values with an empty hash is expected to equal true with a hash with string keys is expected to all be send type is expected to eq 2 with a hash with literal values is expected to all be literal is expected to eq 3 #each_pair when passed a block yields all the pairs when not passed a block is expected to equal true #braces? with braces is expected to be truthy as an argument with no braces is expected to be falsey as an argument with braces is expected to be truthy #mixed_delimiters? when all pairs are using a colon delimiter is expected to be falsey when all pairs are using a hash rocket delimiter is expected to be falsey when pairs are using different delimiters is expected to be truthy RuboCop::AST::Token #line returns line of token #begin_pos returns index of first char in token range of entire source #space_before returns truthy MatchData when there is a space before token returns nil when there is not a space before token returns nil when it is on the first line #column returns index of first char in token range on that line type predicates #left_array_bracket? returns true for left_array_bracket tokens returns false for non left_array_bracket tokens #comment? returns false for non comment tokens returns true for comment tokens #semicolon? returns true for semicolon tokens returns false for non semicolon tokens #equals_sign? returns false for non equals sign tokens returns true for equals sign tokens #left_bracket? returns false for non left_bracket tokens returns true for all left_bracket tokens with braces & parens #left_parens? returns true for left parens tokens returns false for non left parens tokens #right_parens? returns false for non right parens tokens returns true for right parens tokens #left_brace? returns true for left hash brace tokens returns false for non left hash brace tokens #left_curly_brace? returns false for non left block brace tokens returns true for left block brace tokens #right_curly_brace? returns true for all right brace tokens returns false for non right brace tokens #left_ref_bracket? returns false for non left_ref_bracket tokens returns true for left_ref_bracket tokens #right_bracket? returns true for all right_bracket tokens returns false for non right_bracket tokens #left_brace? returns false for non right_bracket tokens returns true for right_bracket tokens #comma? returns false for non comma tokens returns true for comma tokens #end? returns true for end tokens returns false for non end tokens #rescue_modifier? returns true for rescue modifier tokens returns false for non rescue modifier tokens #space_after returns truthy MatchData when there is a space after token returns nil when there is not a space after token #to_s returns string of token data #end_pos returns index of last char in token range of entire source .from_parser_token returns a #to_s useful for debugging sets parser token's text to rubocop token's text sets parser token's type to rubocop token's type sets parser token's range to rubocop token's pos RuboCop::AST::AndNode #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 semantic and node is expected to eq "or" with a logical and node is expected to eq "||" #alternate_operator with a logical and node is expected to eq "and" with a semantic and node is expected to eq "&&" #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 semantic and node is expected to equal true with a logical and node is expected to equal true #lhs with a semantic and node is expected to equal true with a logical and node is expected to equal true #rhs with a semantic and node is expected to equal true with a logical and node is expected to equal true #operator with a semantic and node is expected to eq "and" with a logical and node is expected to eq "&&" RuboCop::AST::ForwardArgsNode when using Ruby 2.7 or newer #to_a is expected to contain exactly (be forward arg type) RuboCop::AST::ConstNode #absolute? is expected to eq true with a constant not starting with :: is expected to eq false with a non-namespaced constant is expected to eq false #relative? with a non-namespaced constant is expected to eq true #module_name? is expected to eq false with a constant with a lowercase letter is expected to eq true #namespace is expected to eq "::Foo::Bar" #each_path yields all parts of the namespace #short_name is expected to eq :BAZ RuboCop::AST::ModuleNode #body with an empty body is expected to equal nil with a multi-expression body is expected to equal true with a single expression body is expected to equal true .new is expected to equal true #identifier is expected to equal true RuboCop::AST::CaseNode #each_when when passed a block yields all the conditions when not passed a block is expected to equal true #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 #when_branches is expected to eq 3 is expected to all be when type #keyword is expected to eq "case" #else_branch #else? with an else statement is expected to equal true without an else statement is expected to equal true #branches when there is an else returns all the bodies with an empty else returns all the bodies when compared to an IfNode returns the same when there is no else keyword returns only then when bodies RuboCop::AST::RuboCopCompatibility when ran from a compatible version of Rubocop issues a warning when ran from an incompatible version of Rubocop issues a warning RuboCop::AST::SuperNode #arguments with a single literal argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with a single splat argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 with no arguments is expected to equal true #dot? is expected to be falsey #camel_case_method? is expected to be falsey #implicit_call? is expected to be falsey #operator_method? is expected to be falsey #comparison_method? is expected to be falsey #double_colon? is expected to be falsey #bang_method? is expected to be falsey #receiver is expected to equal true #first_argument with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true with a single literal argument is expected to equal true with multiple mixed arguments is expected to equal true with no arguments is expected to equal true #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 #macro? is expected to be falsey #const_receiver? is expected to be falsey #self_receiver? is expected to be falsey #splat_argument? with mixed arguments is expected to be truthy with regular arguments is expected to be falsey with a splat argument is expected to be truthy with no arguments is expected to be falsey .new with a super node is expected to equal true with a zsuper node is expected to equal true #method? when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy #assignment_method? is expected to be falsey #method_name is expected to eq :super #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 #block_argument? with no arguments is expected to be falsey with mixed arguments is expected to be truthy with regular arguments is expected to be falsey with a block argument is expected to be truthy #predicate_method? is expected to be falsey #arguments? with no arguments is expected to be falsey with a single literal argument is expected to be truthy with a single splat argument is expected to be truthy with multiple literal arguments is expected to be truthy with multiple mixed arguments is expected to be truthy #command? when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy #block_literal? with 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 #setter_method? is expected to be falsey #parenthesized? with arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey with no arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey RuboCop::AST::NodePattern negation on a set with a matching value behaves like nonmatching doesn't match with a non-matching value is expected to match code :@a and s(:int, 3) on a symbol with a matching symbol behaves like nonmatching doesn't match with a non-matching symbol, but too many children behaves like nonmatching doesn't match with a non-matching symbol is expected to match code s(:send, nil, :obj) and :xyz when nested in complex ways with (send str :+ (send str :to_i)) is expected to match code s(:str, "abc"), :+, and s(:send, s(:str, "1"), :to_i) with (send str :<< str) behaves like nonmatching doesn't match with (send int :- int) is expected to match code s(:int, 1), :-, and s(:int, 1) on a string with a matching string behaves like nonmatching doesn't match with a non-matching symbol is expected to match code s(:str, "bar") and :upcase on square brackets with a node which meets only 1 requirement of [] is expected to match code 1 with a node which meets all requirements of [] behaves like nonmatching doesn't match on a sequence with a node with non-matching children is expected to match code :@b and s(:int, 1) with a node of different type is expected to match code :@@a and s(:int, 1) with a matching node behaves like nonmatching doesn't match caret (ascend) using unification to match self within parent with self in the right position is expected to match code 2 with self in the wrong position behaves like nonmatching doesn't match within sequence not in head is expected to match code s(:int, 1) and :inc of a sequence is expected to match code s(:int, 1) and :inc in head is expected to match code 1 of a sequence is expected to match code 1 used with a node type which matches is expected to match code 1 which doesn't match behaves like nonmatching doesn't match repeated twice is expected to match code 1 inside an intersection is expected to match code 1 inside a union is expected to match code "abc" captures within union with a different number of captures in each branch behaves like invalid is invalid 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 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 within nested sequences behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block nil nil literals is expected to match code nil value in AST, use nil? method is expected to match code nil and :foo against a node pattern (bug #5470) behaves like nonmatching doesn't match nil value in AST behaves like nonmatching doesn't match captures on a wildcard in head position in a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block at the root level behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in head position in a sequence against nil (bug #5470) behaves like nonmatching doesn't match nested in any child behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in non-head position in a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in a nested sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in head position in a sequence against literal (bug #5470) behaves like nonmatching doesn't match ellipsis with a wildcard 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 preceding a capture behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a nested sequence at the end, but no remaining child behaves like nonmatching doesn't match at the very beginning of a sequence is expected to match code s(:int, 10), :*, and s(:int, 1) with [] 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 behaves like nonmatching doesn't match captures which also perform a match 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 on [] behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on a node type behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 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 any order 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 without ellipsis with matching children behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with too few children behaves like nonmatching doesn't match with too many children behaves like nonmatching doesn't match 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 returns captured values if there is no block yields captured value(s) and returns true if there is a block with a captured ellipsis nested behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block matching all children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block matching non sequential children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 nested behaves like invalid is invalid containing ellipsis not at the end behaves like invalid is invalid captured without ellipsis behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block literals bare literal on a node behaves like nonmatching doesn't match on a matching literal is expected to match code :bar negative float literals is expected to match code -2.5 negative integer literals is expected to match code -100 single quoted string literals is expected to match code "foo" double quoted string literals is expected to match code "foo" positive float literals is expected to match code 1.0 symbol literals is expected to match code :foo simple sequence on a node with the same type and matching children is expected to match code s(:int, 1), :+, and s(:int, 1) on a node with too many children behaves like nonmatching doesn't match on a node with a different type behaves like nonmatching doesn't match with a nested sequence in non-head position is expected to match code s(:send, s(:send, nil, :obj), :a) and :b with a nested sequence in head position behaves like invalid is invalid 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 funcalls with one argument is expected to match code s(:str, "foo") and "foo" without extra arguments is expected to match code :a and s(:int, 1) with multiple arguments is expected to match code s(:str, "c"), "a", and "d" predicates with a constant argument for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true is expected to match code s(:int, 1), :+, and s(:int, 2) with multiple arguments for which the predicate is true is expected to match code s(:str, "c"), "a", and "d" for which the predicate is false behaves like nonmatching doesn't match with a named argument for which the predicate is true is expected to match code s(:send, s(:int, 1), :+, s(:int, 2)) and {:param=>1} with extra arguments raises an error for which the predicate is false behaves like nonmatching doesn't match when not given raises an error when negated is expected to match code s(:int, 1) and :inc in root position is expected to match code s(:int, 1) and :inc with name containing a numeral is expected to match code s(:int, 1) and :inc applied to an integer for which the predicate is false behaves like nonmatching doesn't match with an expression argument for which the predicate is true is expected to match code s(:int, 2), :+, and s(:float, 2.0) for which the predicate is false behaves like nonmatching doesn't match applied to an integer for which the predicate is true is expected to match code s(:int, 1) and :inc when in last-child position, but all children have already been matched behaves like nonmatching doesn't match with one extra argument for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true is expected to match code s(:send, s(:int, 1), :+, s(:int, 2)) and 1 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 at head position of a sequence is expected to match code s(:int, 1) and :inc bad syntax with doubled comma in arg list behaves like invalid is invalid with empty parentheses behaves like invalid is invalid with leading comma in arg list behaves like invalid is invalid with unmatched opening curly behaves like invalid is invalid with empty union behaves like invalid is invalid with unmatched opening paren behaves like invalid is invalid with empty intersection behaves like invalid is invalid with unmatched closing curly behaves like invalid is invalid with negated ellipsis behaves like invalid is invalid with negated closing paren behaves like invalid is invalid with unmatched opening paren and `...` behaves like invalid is invalid with doubled ellipsis behaves like invalid is invalid with unmatched closing paren behaves like invalid is invalid with negated closing curly behaves like invalid is invalid unions with a nested sequence is expected to match code s(:const, nil, :Const) and :method nested inside a sequence is expected to match code s(:const, nil, :Const) and :method at the top level containing string literals is expected to match code s(:str, "a") and :upcase containing symbol literals when the AST does not have a matching symbol behaves like nonmatching doesn't match when the AST has a matching symbol is expected to match code s(:send, nil, :obj) and :b containing multiple [] on a node which meets all requirements of the second [] is expected to match code 2.4 on a node which meets all requirements of the first [] is expected to match code 3 on a node which meets some requirements but not all behaves like nonmatching doesn't match containing integer literals is expected to match code s(:int, 10) and :abs containing mixed node and literals is expected to match code nil and :obj 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 commas with commas randomly strewn around behaves like invalid is invalid .descend yields all children depth first yields the given argument if it is not a Node sequence with trailing ... on a node with the same type and more children with 1 child more is expected to match code s(:int, 1), :blah, and s(:int, 1) with 2 children more is expected to match code s(:int, 1), :blah, s(:int, 1), and s(:sym, :something) 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 is expected to match code s(:int, 1) and :blah 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 on a node with non-matching children behaves like nonmatching doesn't match node type in seq head on a node with the same type is expected to match code s(:ivar, :@ivar), :+, and s(:int, 2) on a child with a different type behaves like nonmatching doesn't match for a child on a child litteral behaves like nonmatching doesn't match on a child with the same type is expected to match code s(:send, nil, :foo) and :bar on a child with a different type behaves like nonmatching doesn't match bare node type yaml compatibility is expected to match code s(:send, nil, :obj) and :method on a node with a different type behaves like nonmatching doesn't match #pattern returns the pattern on a node with the same type is expected to match code s(:send, nil, :obj) and :method #to_s is instructive marshal compatibility is expected to match code s(:send, nil, :obj) and :method #== returns true iff the patterns are similar on a node with a matching, hyphenated type is expected to match code s(:lvasgn, :a), :+, and s(:int, 1) #dup is expected to match code s(:send, nil, :obj) and :method params when inside a union, with a nonmatching value behaves like nonmatching doesn't match when preceded by ... is expected to match code s(:send, s(:int, 1), :+, s(:int, 10)) and s(:int, 10) as named parameters when not provided raises an ArgumentError when provided as argument to match is expected to match code s(:int, 10) and {:foo=>#} when extra are provided raises an ArgumentError in a nested sequence is expected to match code s(:send, s(:send, s(:int, 5), :dec), :inc), :inc, and :dec when negated, with a matching value behaves like nonmatching doesn't match when captured behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block without explicit number is expected to match code s(:const, s(:const, nil, :Namespace), :A), :A, and s(:const, nil, :Namespace) 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 in root position is expected to match code s(:int, 10) and s(:int, 10) in root position is expected to match code s(:int, 10) and # when inside a union, with a matching value is expected to match code s(:int, 10) and 10 when negated, with a nonmatching value is expected to match code s(:const, s(:const, nil, :Namespace), :B) and :A when inside an intersection is expected to match code s(:int, 20), 10, and 20 param number zero in a position which matches original target node is expected to match code 1 in a position which does not match original target node behaves like nonmatching doesn't match repeated using ? with too many matching children behaves like nonmatching doesn't match with zero match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block behaves like repeated pattern with an ellipsis in the same sequence behaves like invalid is invalid at beginning of sequence behaves like invalid is invalid with one match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block using + behaves like repeated pattern with an ellipsis in the same sequence behaves like invalid is invalid with one match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block at beginning of sequence behaves like invalid is invalid with zero match behaves like nonmatching doesn't match with matching children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block using * nested with multiple subcaptures behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with no match behaves like nonmatching doesn't match without capture is expected to match code s(:sym, :hello), s(:int, 1), s(:int, 2), and s(:int, 3) with matching children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with zero match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block behaves like repeated pattern with 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 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 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 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 literal match is expected to match code s(:int, 1) and s(:array, s(:array, s(:int, 2), s(:int, 3), s(:array, s(:array, s(:int, 5)))), s(:int, 4)) without match behaves like nonmatching doesn't match 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 wildcards named wildcards within a sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) at the root level is expected to match code s(:sclass, s(:self), s(:def, :something, s(:args), s(:int, 1))) and :freeze within a union with a preceding unifying constraint that can not be unified behaves like nonmatching doesn't match matching a branch is expected to match code s(:int, 2) and s(:array, s(:int, 2), s(:int, 1)) confined to the union without unification is expected to match code s(:int, 2) and s(:int, 1) with partial unification matching the unified branch is expected to match code s(:int, 5) and s(:int, 5) matching the free branch is expected to match code s(:int, 2) and s(:int, 1) that can not be unified behaves like nonmatching doesn't match with a succeeding unifying constraint with all branches with the wildcard matching another branch is expected to match code s(:array, s(:int, 2), s(:int, 1)) and s(:int, 2) matching the first branch is expected to match code s(:array, s(:int, 1), s(:int, 2)) and s(:int, 2) that can not be unified behaves like nonmatching doesn't match with branches without the wildcard encountered after behaves like invalid is invalid encountered first behaves like invalid is invalid in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) within a sequence with values which cannot be unified behaves like nonmatching doesn't match unifying the node type with an argument is expected to match code s(:send, nil, :obj) and :send with values which can be unified is expected to match code s(:int, 5), :+, and s(:int, 5) unnamed wildcards at the root level is expected to match code s(:sclass, s(:self), s(:def, :something, s(:args), s(:int, 1))) and :freeze negated behaves like nonmatching doesn't match in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) within a sequence is expected to match code nil and :Const within a sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) macros with a pattern with captures def_node_search without a predicate name 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 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 non-matching code behaves like nonmatching doesn't match when called on matching code is expected to match code nil, :foo, s(:sym, :hello), and s(:sym, :world) def_node_matcher when called on matching code is expected to eq :hello when it errors raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match with a pattern without captures def_node_matcher when called on matching code is expected to match code :hello when called on non-matching code behaves like nonmatching doesn't match when it errors raises an error with the right location def_node_search with a predicate name when called on matching code is expected to match code nil, :foo, s(:sym, :hello), and s(:sym, :world) when it errors raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match without a predicate name when it errors raises an error with the right location when called on non-matching code returns an enumerator yielding nothing when called on matching code returns an enumerator yielding the matches with a pattern with a constant is expected to match code :hello when the value is not in the set 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 behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining node type at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with 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 after a child behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a remaining set at the end 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 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 behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a remaining capture at the end behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining [] at the end behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block at the very beginning of a sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block RuboCop::AST::CaseMatchNode when using Ruby 2.7 or newer #else_branch #else? without an else statement is expected to equal true with an else statement is expected to equal true #keyword is expected to eq "case" .new is expected to equal true #each_in_pattern when passed a block yields all the conditions when not passed a block is expected to equal true #else? with an else statement is expected to equal true without an else statement is expected to equal false #in_pattern_branches is expected to eq 3 is expected to all be in pattern type RuboCop::AST::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 no arguments and braces is expected to equal true with no arguments is expected to equal true with multiple literal arguments is expected to eq 2 with a single argument is expected to eq 1 with a single argument and braces is expected to eq 1 RuboCop::AST::StrNode #heredoc? with a normal string is expected to equal false with a heredoc is expected to equal true with a string with interpolation is expected to equal false .new with a normal string is expected to equal true with a string with interpolation is expected to equal true with a heredoc is expected to equal true RuboCop::AST::ArrayNode #bracketed? with a percent literal is expected to equal true unbracketed is expected to equal nil with square brackets is expected to equal true #square_brackets? with square brackets is expected to be truthy with a percent literal is expected to be falsey .new is expected to equal true #percent_literal? with a symbol percent literal is expected to be falsey is expected to be truthy 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 is expected to be falsey #values with an array of literals is expected to all be literal is expected to eq 3 with an empty array is expected to equal true with an array of variables is expected to all be send type is expected to eq 2 #each_value with block is expected to equal true is expected to eq ["(int 1)", "(int 2)", "(int 3)"] without block is expected to equal true Set#=== tests for inclusion RuboCop::AST::IntNode .new is expected to be truthy #sign? explicit negative int is expected to be truthy explicit positive int is expected to be truthy #value is expected to eq 10 RuboCop::AST::IfNode #elsif_conditional? with nested ternary operators when nested in the falsey branch is expected to be falsey when nested in the truthy branch is expected to be falsey with one elsif conditional is expected to be truthy with nested conditionals in if clause is expected to be falsey with nested conditionals in else clause is expected to be falsey with multiple elsif conditionals is expected to be truthy #modifier_form? with a modifier if statement is expected to be truthy with a modifier unless statement is expected to be truthy with a ternary operator is expected to be falsey with a non-modifier if statement is expected to be falsey with a non-modifier unless statement is expected to be falsey .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 #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 #elsif? with an if statement comtaining an elsif is expected to be falsey with an elsif statement is expected to be truthy without an elsif statement 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? with a ternary operator is expected to be falsey with an if statement is expected to be truthy with an unless statement is expected to be falsey #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" #nested_conditional? with no nested conditionals is expected to be falsey with nested conditionals in if 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 with nested conditionals in elsif clause is expected to be truthy with nested conditionals in else clause is expected to be truthy #if_branch with an if statement is expected to equal true with a ternary operator is expected to equal true with an unless statement is expected to equal true #keyword with an if statement is expected to eq "if" with a ternary operator is expected to eq "" with an unless statement is expected to eq "unless" #each_branch when passed a block yields all the branches when not passed a block is expected to equal true #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 #branches with an unless statement is expected to all be literal is expected to eq 1 with an else statement is expected to all be literal is expected to eq 2 with an 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 #else? without an else statement is expected to be falsey with an elsif statement is expected to be truthy RuboCop::AST::Ext::Range #line_span returns the range of lines a range occupies accepts an `exclude_end` keyword argument Finished in 1.76 seconds (files took 1.16 seconds to load) 1441 examples, 0 failures Randomized with seed 42950 /usr/bin/ruby3.0 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby3.0 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all:/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -e gem\ \"rubocop-ast\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby3.0 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/ruby-rubocop-ast/usr/share/rubygems-integration/all:/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -S rake -f debian/ruby-tests.rake /usr/bin/ruby3.0 -ruri -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation Randomized with seed 3946 RuboCop::AST::ProcessedSource #file_path returns file path with heavily commented source #find_comment yields correct comment yields nil when there is no match #each_comment_in_lines yields the comments #comments_before_line returns comments on or before given line #contains_comment? provided source_range on line with comment is expected to equal true provided source_range on comment line is expected to equal true provided a multiline source_range with at least one line with comment is expected to equal true provided source_range on line without comment is expected to equal false #comment_at_line returns the comment at the given line number returns nil if line has no comment #line_with_comment? returns true for lines with comments returns false for lines without comments #each_comment yields all comments .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 valid_syntax? when the source could not be parsed due to encoding error returns false when a line starts with an integer literal tokenizes the source correctly when the source is invalid returns false when the source is completely valid returns true when the source itself is valid encoding but includes strange encoding literals that are accepted by MRI returns true when the source is valid but has some warning diagnostics returns true #blank? with source with content returns false with source of no content returns true #ast is the root node of AST token enumerables #each_token yields all tokens #find_token yields correct token yields nil when there is no match #buffer is a source buffer #preceding_line returns source of line before token #lines contains lines as string without linefeed is an array has same number of elements as line count #last_token_of returns last token for node accepts Node as an argument #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 #first_token_of accepts Node as an argument returns first token for node #[] when start index and length are passed returns the array of lines when a range is passed returns the array of lines when an index is passed returns the line #comments is an array of comments when the source is invalid returns [] #parser_error when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII is nil when the source was properly parsed is nil when the source could not be parsed due to encoding error returns the error #tokens has an array of tokens #tokens_within returns tokens for node accepts Node as an argument when heredoc as argument is present returns tokens for heredoc node returns tokens for node before heredoc returns tokens for node after heredoc #following_line returns source of line after token #path is the path passed to .new RuboCop::AST::LambdaNode #arguments is expected to eq 2 #method_name is expected to eq :lambda #receiver is expected to eq nil RuboCop::AST::SymbolNode .new with a symbol node is expected to equal true #value is expected to eq :foo RuboCop::AST::PairNode #hash_rocket? when using a colon delimiter is expected to be falsey when using a hash rocket delimiter is expected to be truthy #colon? when using a hash rocket delimiter is expected to be falsey when using a colon delimiter is expected to be truthy #same_line? 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 when a multiline pair shares the same line when both pairs are explicit pairs is expected to be truthy is expected to be truthy when last pair is a keyword splat is expected to be truthy is expected to be truthy when pairs are on separate lines when both pairs are explicit pairs is expected to be falsey when last pair is a keyword splat is expected to be falsey .new is expected to equal true #value_delta when using colon delimiters when receiver value is behind is expected to eq -2 when both pairs are on the same line is expected to eq 0 when receiver value is ahead is expected to eq 2 when values are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when using hash rocket delimiters when receiver value is ahead is expected to eq 2 when values are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver value is behind is expected to eq -2 when both pairs are on the same line is expected to eq 0 #value_on_new_line? when value spans multiple lines 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 #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 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 " => " #key when using a symbol key is expected to equal true when using a string key is expected to equal true #key_delta with alignment set to :right when using hash rocket delimiters when keys are aligned when both keys are explicit keys is expected to eq 0 when second key is a keyword splat is expected to eq 0 when both keys are on the same line when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 0 when receiver key is behind when both pairs are explicit pairs is expected to eq -2 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 second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is behind when both pairs are reail pairs is expected to eq -2 when second pair is a keyword splat is expected to eq 0 when keys are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 0 with alignment set to :left when using hash rocket delimiters when receiver key is behind when second pair is a keyword splat is expected to eq -2 when both pairs are explicit pairs is expected to eq -2 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 2 when both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when keys are aligned when second key is a keyword splat is expected to eq 0 when both keys are explicit keys is expected to eq 0 when using colon delimiters when receiver key is ahead when second pair is a keyword splat is expected to eq 2 when both pairs are explicit pairs is expected to eq 2 when keys are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is behind when both pairs are reail pairs is expected to eq -2 when second pair is a keyword splat is expected to eq -2 when both keys are on the same line when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 RuboCop::AST::WhenNode #each_condition when not passed a block is expected to equal true when passed a block yields all the conditions .new is expected to equal true #conditions with a single condition is expected to all be literal is expected to eq 1 with a multiple conditions is expected to eq 3 is expected to all be literal #branch_index is expected to eq 2 is expected to eq 1 is expected to eq 0 #then? with a then keyword is expected to be truthy without a then keyword is expected to be falsey #body without a then keyword is expected to equal true with a then keyword is expected to equal true RuboCop::AST::ModuleNode #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::CaseNode #each_when when not passed a block is expected to equal true when passed a block yields all the conditions #when_branches is expected to all be when type is expected to eq 3 #branches when there is an else returns all the bodies with an empty else returns all the bodies when there is no else keyword returns only then when bodies when compared to an IfNode returns the same .new is expected to equal true #else_branch #else? with an else statement is expected to equal true without an else statement is expected to equal true #else? without an else statement is expected to be falsey with an else statement is expected to be truthy #keyword is expected to eq "case" RuboCop::AST::UntilNode #keyword is expected to eq "until" #inverse_keyword is expected to eq "while" .new with a modifier until is expected to equal true with a statement until is expected to equal true #do? without a do keyword is expected to be falsey with a do keyword is expected to be truthy #post_condition_loop? with a statement until is expected to be falsey with a modifier until is expected to be truthy #loop_keyword? with a statement until is expected to be truthy with a modifier until is expected to be truthy RuboCop::AST::FloatNode .new is expected to be truthy #value is expected to eq 1.5 #sign? explicit positive float is expected to be truthy explicit negative float is expected to be truthy 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::IntNode .new is expected to be truthy #value is expected to eq 10 #sign? explicit negative int is expected to be truthy explicit positive int is expected to be truthy RuboCop::AST::RuboCopCompatibility when ran from an incompatible version of Rubocop issues a warning when ran from a compatible version of Rubocop issues a warning RuboCop::AST::Ext::Range #line_span returns the range of lines a range occupies accepts an `exclude_end` keyword argument RuboCop::AST::KeywordSplatNode #hash_rocket? is expected to be falsey #value_delta when using colon delimiters when keyword splat is behind is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is 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 on the same line is expected to eq 0 when keyword splat is behind is expected to eq 0 when keyword splat is left aligned is expected to eq 0 #same_line? when pairs are on separate lines is expected to be falsey when both pairs are on the same line is expected to be truthy when a multiline pair shares the same line is expected to be truthy is expected to be truthy #operator is expected to eq "**" #key is expected to eq s(:kwsplat, s(:send, nil, :foo)) #key_delta with alignment set to :left when using colon delimiters when keyword splat is aligned is expected to eq 0 when keyword splat is ahead is expected to eq 2 when keyword splat is on the same line is expected to eq 0 when keyword splat is behind is expected to eq -2 when using hash rocket delimiters when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 2 when keyword splat is behind is expected to eq -2 when keyword splat is aligned is expected to eq 0 with alignment set to :right when using hash rocket 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 behind is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when using colon delimiters when keyword splat is aligned is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is behind is expected to eq 0 .new is expected to equal true #colon? is expected to be falsey #value is expected to eq s(:kwsplat, s(:send, nil, :foo)) 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 .new is expected to equal true #identifier is expected to equal true #body with a single expression body is expected to equal true with an empty body is expected to equal nil with a multi-expression body is expected to equal true RuboCop::AST::BreakNode behaves like wrapped arguments node .new without arguments is expected to equal true with arguments is expected to equal true #arguments with no arguments and braces is expected to equal true with no arguments is expected to equal true with a single splat argument is expected to eq 1 with a single argument and braces is expected to eq 1 with multiple literal arguments is expected to eq 2 with a single argument is expected to eq 1 RuboCop::AST::AliasNode #new_identifier is expected to eq :foo is expected to equal true .new is expected to equal true #old_identifier is expected to equal true is expected to eq :bar RuboCop::AST::WhileNode #keyword is expected to eq "while" #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey #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 #post_condition_loop? with a modifier while is expected to be truthy with a statement while is expected to be falsey #inverse_keyword is expected to eq "until" RuboCop::AST::RegexpNode #options with a regexp with multiple options is expected to eq 3 with a regexp with "o" option is expected to eq 0 with a regexp with single option is expected to eq 1 with an empty regexp is expected to eq 0 with a regexp without option is expected to eq 0 #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 %r/-delimiters is expected to eq true with /-delimiters is expected to eq 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 #ignore_case? with only i option is expected to equal true with other options is expected to equal false with i and other options is expected to equal true with no options is expected to equal false #to_regexp with a multi-line regexp with option is expected to eq / .+ /ix with an empty regexp with option is expected to eq //ix with a regexp with an "o" option is expected to eq "/abc/i" with a regexp with option is expected to eq /.+/mix with a regexp without option is expected to eq /.+/ with an empty regexp is expected to eq // with a multi-line regexp without option is expected to eq / .+ / #extended? with no options is expected to equal false with other 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 #delimiters with %r/-delimiters is expected to eq ["/", "/"] with multi-line %r{-delimiters is expected to eq ["{", "}"] with %r{-delimiters is expected to eq ["{", "}"] with %r<-delimiters is expected to eq ["<", ">"] with /-delimiters is expected to eq ["/", "/"] #slash_literal? 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 with %r{-delimiters is expected to eq false #regopt with a multi-line regexp with option is expected to eq [:i, :m, :x] is expected to equal true with a regexp with option is expected to eq [:i, :m, :x] 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 multi-line regexp without option is expected to equal true is expected to equal true with an empty regexp with option is expected to equal true is expected to eq [:i, :x] .new is expected to equal true #content with a regexp with option 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 multi-line regexp with option is expected to eq "\n.+\n" with an empty regexp is expected to eq "" with a regexp without option is expected to eq ".+" #single_interpolation? with no options is expected to equal false with only o option is expected to equal true with other options is expected to equal false with o and other options is expected to equal true #no_encoding? with only n option is expected to equal true with 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 #multiline_mode? with m and other options is expected to equal true with other options is expected to equal false with no options is expected to equal false with only m option is expected to equal true #delimiter? with multi-line %r{-delimiters is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq false is expected to eq 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 true is expected to eq true is expected to eq false is expected to eq false is expected to eq false with %r<-delimiters is expected to eq false is expected to eq false is expected to eq false is expected to eq 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 %r/-delimiters is expected to eq false is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false with /-delimiters is expected to eq false is expected to eq true RuboCop::AST::HashNode .new is expected to equal true #values with a hash with literal values is expected to eq 3 is expected to all be literal with an empty hash is expected to equal true with a hash with string keys is expected to eq 2 is expected to all be send type #pairs_on_same_line? with some pairs on the same line is expected to be truthy with no pairs on the same line is expected to be falsey with all pairs on the same line is expected to be truthy #each_value when passed a block yields all the pairs when not passed a block is expected to equal true #braces? as an argument with braces is expected to be truthy with braces is expected to be truthy as an argument with no braces is expected to be falsey #each_pair when not passed a block is expected to equal true when passed a block yields all the pairs #each_key when not passed a block is expected to equal true when passed a block yields all the pairs #keys with a hash with symbol keys is expected to eq 3 is expected to all be sym type with an empty hash is expected to equal true with a hash with string keys is expected to eq 2 is expected to all be str type #pairs with a hash of literals is expected to eq 3 is expected to all be pair type with a hash of variables is expected to all be pair type is expected to eq 2 with an empty hash is expected to equal true #mixed_delimiters? when all pairs are using a hash rocket delimiter is expected to be falsey when pairs are using different delimiters is expected to be truthy when all pairs are using a colon delimiter is expected to be falsey #empty? with a hash containing a keyword splat is expected to equal false with a hash containing pairs is expected to equal false with an empty hash is expected to equal true RuboCop::AST::ArrayNode #square_brackets? with a percent literal is expected to be falsey with square brackets is expected to be truthy #values with an array of literals is expected to eq 3 is expected to all be literal with an array of variables is expected to eq 2 is expected to all be send type with an empty array is expected to equal true #each_value with block is expected to eq ["(int 1)", "(int 2)", "(int 3)"] is expected to equal true without block is expected to equal true .new is expected to equal true #bracketed? with a percent literal is expected to equal true unbracketed is expected to equal nil with square brackets is expected to equal true #percent_literal? with a string percent literal is expected to be truthy is expected to be truthy is expected to be falsey with a symbol percent literal is expected to be falsey is expected to be truthy is expected to be truthy with square brackets is expected to be falsey is expected to be falsey is expected to be falsey RuboCop::AST::RescueNode #branches when there is an else returns all the bodies with an empty else returns all the bodies when there is no else keyword returns only then rescue bodies #else_branch with an else statement is expected to equal true without an else statement is expected to equal true #else? without an else statement is expected to be falsey with an else statement is expected to be truthy #body is expected to equal true .new is expected to equal true #resbody_branches is expected to all be resbody type is expected to eq 2 RuboCop::AST::ResbodyNode .new is expected to equal true #body is expected to equal true #exception_variable for an explicit rescue is expected to eq "ex" for an implicit rescue is expected to eq "ex" when an exception variable is not given is expected to equal nil #exceptions without exception is expected to eq 0 with a single exception is expected to eq 1 is expected to all be const type with multiple exceptions is expected to all be const type is expected to eq 2 #branch_index is expected to eq 0 is expected to eq 2 is expected to eq 1 RuboCop::AST::BlockNode #single_line? when block is on several lines is expected to be falsey when block is on a single line is expected to be truthy #delimiters when enclosed in do-end keywords is expected to eq ["do", "end"] when enclosed in braces is expected to eq ["{", "}"] .new is expected to equal true #opening_delimiter when enclosed in braces is expected to eq "{" when enclosed in do-end keywords is expected to eq "do" #closing_delimiter when enclosed in braces is expected to eq "}" when enclosed in do-end keywords is expected to eq "end" #multiline? when block is on several lines is expected to be truthy when block is on a single line 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 mixed arguments is expected to eq 2 with no arguments is expected to equal true >= Ruby 2.7 using numbered parameters is expected to equal true #keywords? when enclosed in do-end keywords is expected to be truthy when enclosed in braces is expected to be falsey #void_context? when block method is tap is expected to be truthy when block method is not each is expected to be falsey when block method is each is expected to be truthy #braces? when enclosed in do-end keywords is expected to be falsey when enclosed in braces is expected to be truthy #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 #arguments? >= Ruby 2.7 using numbered parameters is expected to equal false with multiple mixed arguments is expected to be truthy with a single argument is expected to be truthy with a single splat argument is expected to be truthy with no arguments is expected to be falsey RuboCop::AST::DefNode #arguments? with a single regular argument is expected to be truthy with multiple mixed arguments is expected to be truthy with a single keyword argument is expected to be truthy with no arguments is expected to be falsey with a single rest argument is expected to be truthy with multiple regular arguments is expected to be truthy #arguments with a single rest argument is expected to eq 1 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 with argument forwarding is expected to eq 1 with multiple mixed arguments is expected to eq 2 #const_receiver? with a singleton method definition is expected to be truthy with a class method definition is expected to be falsey with an instance method definition is expected to be falsey .new with a defs node is expected to equal true with a def node is expected to equal true when using Ruby 2.7 or newer #argument_forwarding? is expected to be truthy #bang_method? with a bang method is expected to be truthy with a regular method is expected to be falsey with a predicate method is expected to be falsey #self_receiver? with an instance method definition is expected to be falsey with a singleton method definition is expected to be falsey with a class method definition is expected to be truthy #last_argument with multiple mixed arguments is expected to equal true with a single rest argument is expected to equal true with multiple regular arguments is expected to equal true with no arguments is expected to equal true with a single keyword argument is expected to equal true with a single regular argument is expected to equal true #comparison_method? with a comparison method is expected to be truthy with a regular method 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 #void_context? with a regular assignment method is expected to be truthy with an initializer method is expected to be truthy with a comparison method is expected to be falsey with a regular method is expected to be falsey with a bracket assignment method is expected to be truthy #first_argument with multiple regular arguments is expected to equal true with a single regular argument is expected to equal true with multiple mixed arguments is expected to equal true with no arguments is expected to equal true with a single rest argument is expected to equal true with a single keyword argument 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 setter method is expected to eq :foo= with a plain method is expected to eq :foo #rest_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 rest argument is expected to be truthy #receiver with a class method definition is expected to equal true with a singleton method definition is expected to equal true with an instance method definition 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 #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 #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 #assignment_method? with an assignment method is expected to be truthy with a regular method is expected to be falsey with a comparison method is expected to be falsey with a bracket assignment method is expected to be truthy #operator_method? with a binary operator method is expected to be truthy with a setter method is expected to be falsey with a unary operator method is expected to be truthy with a regular method is expected to be falsey #block_argument? with a block argument is expected to be truthy with no arguments is expected to be falsey with regular arguments is expected to be falsey with mixed arguments is expected to be truthy RuboCop::AST::SuperNode #double_colon? 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 #method_name is expected to eq :super #last_argument 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 with a single literal argument is expected to equal true with no arguments is expected to equal true #self_receiver? is expected to be falsey #bang_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 #operator_method? is expected to be falsey #block_node with a block literal is expected to equal true with a block argument is expected to equal true with no block is expected to equal true #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 a single splat argument is expected to be truthy with multiple mixed arguments is expected to be truthy #predicate_method? is expected to be falsey #splat_argument? with a splat argument is expected to be truthy with mixed arguments is expected to be truthy with no arguments is expected to be falsey with regular arguments is expected to be falsey #block_argument? with no arguments is expected to be falsey with mixed arguments is expected to be truthy with regular arguments is expected to be falsey with a block argument is expected to be truthy #setter_method? is expected to be falsey #first_argument with no arguments is expected to equal true with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true with multiple mixed arguments is expected to equal true with a single literal argument is expected to equal true #dot? is expected to be falsey #block_literal? with no block is expected to be falsey with a block argument is expected to be falsey with a block literal is expected to be truthy #arguments with a single splat argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 with multiple literal arguments is expected to eq 2 with a single literal argument is expected to eq 1 with no arguments is expected to equal true #receiver is expected to equal true #const_receiver? is expected to be falsey #macro? is expected to be falsey #parenthesized? with arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey with no arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey #comparison_method? is expected to be falsey #camel_case_method? 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 #assignment_method? is expected to be falsey 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 .new 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::AndNode #alternate_operator with a logical and node is expected to eq "and" with a semantic and node is expected to eq "&&" .new with a semantic and node is expected to equal true with a logical and node is expected to equal true #logical_operator? with a semantic and node is expected to equal false with a logical and node is expected to equal true #operator with a semantic and node is expected to eq "and" with a logical and node is expected to eq "&&" #semantic_operator? with a semantic and node is expected to equal true with a logical and node is expected to equal false #inverse_operator with a logical and node is expected to eq "||" with a semantic and node is expected to eq "or" #lhs with a logical and node is expected to equal true with a semantic and node is expected to equal true #rhs with a logical and node is expected to equal true with a semantic and node is expected to equal true Set#=== tests for inclusion RuboCop::AST::Node #pure? for a cvar assignment returns false for an integer literal returns true for a gvar assignment 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 nested if where one branch contains an assignment statement returns false where one branch contains a method call returns false where the innermost descendants are local vars and literals returns true for a method call returns false for a regexp with no interpolation returns true with options returns true with interpolated segments returns false for a module definition returns false for an ivar assignment returns false for an lvar assignment returns false for a class definition returns false sibling_access returns trivial values for a root node for a single child returns the expected values for a node with siblings returns the expected values #struct_constructor? struct definition without block does not match ::Struct matches struct definition with a block matches #class_definition? with Class.new matches constant defined as Struct without block does not match with Struct matches with ::ClassName matches with inheritance matches with object singleton class matches without inheritance matches with self singleton class matches namespaced class matches #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 #argument_type? method arguments returns true for all argument types block arguments returns true for all argument types #value_used? at the end of a block 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 within a module definition node is always true within a singleton class node is always true within a class definition node is always true at the top level is false within an array literal assigned to an ivar is always true at the top level is always false within a method call node is always true within a while node is true only for the condition #module_definition? nested modules matches with ::ModuleName matches prepend Module.new matches with Module.new matches namespaced modules matches using module keyword matches included module definition matches #recursive_basic_literal? behaves like literal returns true for `nil` behaves like literal returns true for `(false && true)` behaves like non literal returns false for `{ some_method_call => :sym }` behaves like literal returns true for `{ :a => 1, :b => 2 }` behaves like literal returns true for `{ a: 1, b: 2 }` behaves like non literal returns false for `(x or false)` behaves like non literal returns false for `some_method_call(x, y)` behaves like literal returns true for `%r{abx}ixo` 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 `'str'` behaves like literal returns true for `"#{2}"` behaves like literal returns true for `(1)` behaves like non literal returns false for `%r{abx#{foo}}ixo` behaves like literal returns true for `[1, 2, 3]` behaves like non literal returns false for `some_method_call` behaves like non literal returns false for `(x == false)` behaves like non literal returns false for `{ :sym => some_method_call }` behaves like literal returns true for `(false or true)` behaves like literal returns true for `false` behaves like literal returns true for `(false <=> true)` behaves like literal returns true for `!true` behaves like literal returns true for `1.0` behaves like literal returns true for `1` behaves like non literal returns false for `[some_method_call]` behaves like literal returns true for `/./` RuboCop::AST::SendNode #attribute_accessor? with an accessor returns the accessor method and Array] with a call without arguments is expected to equal nil #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 #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 #self_receiver? with an implicit receiver is expected to be falsey with a non-self receiver is expected to be falsey with a self receiver is expected to be truthy #assignment_method? with a comparison method is expected to be falsey with a regular method is expected to be falsey with an assignment method is expected to be truthy with a bracket assignment method is expected to be truthy #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 #block_argument? with no arguments is expected to be falsey with a block argument is expected to be truthy with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #def_modifier? with a prefixed def modifier is expected to be truthy with several prefixed def modifiers is expected to be truthy #binary_operation?? with a unary operation is expected to equal false with an implicit call method is expected to equal false with a binary operation is expected to equal true with a regular method call is expected to equal false #dot? with a unary method is expected to be falsey with a double colon is expected to be falsey with a dot is expected to be truthy without a dot is expected to be falsey #operator_method? with a binary operator method is expected to be truthy with a regular method is expected to be falsey with a unary operator method is expected to be truthy with a setter method is expected to be falsey #nonmutating_binary_operator_method? with a mutating binary operator method is expected to be falsey with a nonmutating binary operator method is expected to be truthy with a regular method is expected to be falsey #double_colon? 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 with a dot 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 #first_argument with a single literal argument 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 with no arguments is expected to equal true #prefix_bang? with keyword `not` is expected to be falsey with a bang method is expected to be truthy with a non-negated method is expected to be falsey #arguments? 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 with a single splat argument is expected to be truthy #unary_operation? with a regular method call is expected to equal false with a unary operation is expected to equal true with a binary operation is expected to equal false with an implicit call method is expected to equal false #post_condition_loop? is expected to equal false #nonmutating_hash_method? with a mutating Hash method is expected to be falsey with a regular method is expected to be falsey with a nonmutating Hash method is expected to be truthy #enumerable_method? with an enumerable method is expected to be truthy with a regular method is expected to be falsey #macro? with a receiver when parent is a class is expected to be falsey when parent is a module is expected to be falsey without a receiver when parent is a begin without a parent is expected to be truthy when parent is a class constructor is expected to be truthy when in the global scope is expected to be truthy when the condition of an if is expected to be falsey when in an if is expected to be truthy when parent is a block in a macro scope is expected to be truthy when parent is a method definition is expected to be falsey when parent is a singleton class is expected to be truthy when parent is a module is expected to be truthy when parent is a class is expected to be truthy without a parent is expected to be truthy when parent is a block not in a macro scope is expected to be falsey when parent is a keyword begin inside of an class 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 #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 #nonmutating_string_method? with a mutating String method is expected to be falsey with a regular method is expected to be falsey with a nonmutating String method is expected to be truthy #arguments with multiple mixed arguments is expected to eq 2 with a single splat argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with a single literal argument is expected to eq 1 with no arguments is expected to equal true #prefix_not? with keyword `not` is expected to be truthy with a non-negated method is expected to be falsey with a bang method is expected to be falsey #camel_case_method? with a regular method is expected to be falsey with a camel case method is expected to be truthy #method? when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy #lambda? with a lambda method is expected to be truthy with a method named lambda in a class is expected to be falsey with a non-lambda method is expected to be falsey with a stabby lambda method is expected to be truthy #access_modifier? when node is not an access modifier is expected to be falsey when node is a non-bare `module_function` is expected to be truthy when node is a bare `module_function` is expected to be truthy #command? when argument is a string with an explicit receiver is expected to be falsey with an implicit receiver is expected to be truthy when argument is a symbol with an explicit receiver is expected to be falsey with an implicit receiver is expected to be truthy #receiver with a variable receiver is expected to equal true with no receiver is expected to equal true with a literal receiver is expected to equal true #nonmutating_unary_operator_method? with a regular method is expected to be falsey with a nonmutating unary operator method is expected to be truthy #predicate_method? with a predicate method is expected to be truthy with a regular method is expected to be falsey with a bang method is expected to be falsey #loop_keyword? is expected to equal false #negation_method? with a non-negated method is expected to be falsey with prefix `not` is expected to be truthy with suffix `not` is expected to be falsey with prefix bang is expected to be truthy #block_node with no block is expected to equal true with a block argument is expected to equal true with a block literal is expected to equal true #method_name 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 :== with an implicit call method is expected to eq :call #last_argument with multiple literal arguments is expected to equal true with no arguments is expected to equal true with a single literal argument is expected to equal true with multiple mixed arguments is expected to equal true with a single splat argument is expected to equal true #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 #bare_access_modifier? when node is a bare `module_function` 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 #nonmutating_operator_method? with a mutating binary operator method is expected to be falsey with a regular method is expected to be falsey with a nonmutating binary operator method is expected to be truthy with a nonmutating unary operator method is expected to be truthy #const_receiver? with a self receiver is expected to be falsey with a constant receiver is expected to be truthy with a non-constant receiver is expected to be falsey .new with a regular method send is expected to equal true with a safe navigation method send is expected to equal true #lambda_literal? with a non-lambda method is expected to be falsey with `a.() {}` style method is expected to be falsey with a lambda method is expected to equal false with a stabby lambda is expected to equal true #nonmutating_array_method? with a nonmutating Array method is expected to be truthy with a mutating Array method is expected to be falsey with a regular method is expected to be falsey #non_bare_access_modifier? 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 `module_function` is expected to be truthy #comparison_method? with a negation method is expected to be falsey with a regular method is expected to be falsey with a comparison method is expected to be truthy RuboCop::AST::NodePattern sequence with trailing ... on a node with the same type and more children with 1 child more is expected to match code s(:int, 1), :blah, and s(:int, 1) with 2 children more is expected to match code s(:int, 1), :blah, s(:int, 1), and s(:sym, :something) on a node with the same type and fewer children behaves like nonmatching doesn't match on a node with non-matching children behaves like nonmatching doesn't match on a node with the same type and exact number of children is expected to match code s(:int, 1) and :blah on a node with a different type behaves like nonmatching doesn't match on a node with fewer children, with a wildcard preceding behaves like nonmatching doesn't match params in a nested sequence is expected to match code s(:send, s(:send, s(:int, 5), :dec), :inc), :inc, and :dec without explicit number is expected to match code s(:const, s(:const, nil, :Namespace), :A), :A, and s(:const, nil, :Namespace) param number zero in a position which matches original target node is expected to match code 1 in a position which does not match original target node behaves like nonmatching doesn't match when preceded by ... is expected to match code s(:send, s(:int, 1), :+, s(:int, 10)) and s(:int, 10) when negated, with a nonmatching value is expected to match code s(:const, s(:const, nil, :Namespace), :B) and :A 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 when negated, with a matching value behaves like nonmatching doesn't match in root position is expected to match code s(:int, 10) and s(:int, 10) in root position is expected to match code s(:int, 10) and # as named parameters when extra are provided raises an ArgumentError when provided as argument to match is expected to match code s(:int, 10) and {:foo=>#} when not provided raises an ArgumentError when preceded by $... behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block when inside a union, with a nonmatching value behaves like nonmatching doesn't match when inside an intersection is expected to match code s(:int, 20), 10, and 20 when inside a union, with a matching value is expected to match code s(:int, 10) and 10 caret (ascend) using unification to match self within parent with self in the right position is expected to match code 2 with self in the wrong position behaves like nonmatching doesn't match within sequence in head is expected to match code 1 of a sequence is expected to match code 1 not in head is expected to match code s(:int, 1) and :inc of a sequence is expected to match code s(:int, 1) and :inc repeated twice is expected to match code 1 inside an intersection is expected to match code 1 used with a node type which doesn't match behaves like nonmatching doesn't match which matches is expected to match code 1 inside a union is expected to match code "abc" bad syntax with unmatched opening curly behaves like invalid is invalid with empty intersection behaves like invalid is invalid with unmatched opening paren and `...` behaves like invalid is invalid with leading comma in arg list behaves like invalid is invalid with negated ellipsis behaves like invalid is invalid with unmatched closing curly behaves like invalid is invalid with unmatched opening paren behaves like invalid is invalid with negated closing curly behaves like invalid is invalid with doubled comma in arg list behaves like invalid is invalid with doubled ellipsis behaves like invalid is invalid with negated closing paren behaves like invalid is invalid with empty union behaves like invalid is invalid with empty parentheses behaves like invalid is invalid with unmatched closing paren behaves like invalid is invalid simple sequence with a nested sequence in non-head position is expected to match code s(:send, s(:send, nil, :obj), :a) and :b with a nested sequence in head position behaves like invalid is invalid on a node with the same type and matching children is expected to match code s(:int, 1), :+, and s(:int, 1) on a node with too many children behaves like nonmatching doesn't match on a node with a different type behaves like nonmatching doesn't match 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 macros with a pattern with a constant is expected to match code :hello when the value is not in the set behaves like nonmatching doesn't match with a pattern with captures def_node_matcher when called on non-matching code behaves like nonmatching doesn't match when called on matching code is expected to eq :hello when it errors raises an error with the right location def_node_search without a predicate name when it errors raises an error with the right location when called on matching code returns an enumerator yielding the captures when the pattern contains keyword_params returns an enumerator yielding the captures when helper is called with default keyword_params is overriden when calling the matcher some defaults are not params raises an error and no value is given to the matcher uses the defaults when called on non-matching code returns an enumerator yielding nothing with a predicate name when it errors raises an error with the right location when called on matching code is expected to match code nil, :foo, s(:sym, :hello), and s(:sym, :world) when called on non-matching code behaves like nonmatching doesn't match with a pattern without captures def_node_search with a predicate name when called on matching code is expected to match code nil, :foo, s(:sym, :hello), and s(:sym, :world) when called on non-matching code behaves like nonmatching doesn't match 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 non-matching code returns an enumerator yielding nothing when called on matching code returns an enumerator yielding the matches def_node_matcher when it errors raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match when called on matching code is expected to match code :hello descend nested behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with an immediate match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a literal match is expected to match code s(:int, 1) and s(:array, s(:array, s(:int, 2), s(:int, 3), s(:array, s(:array, s(:int, 5)))), s(:int, 4)) without match behaves like nonmatching doesn't match with a match multiple levels, depth first behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block comments behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block captures within union with a different number of captures in each branch behaves like invalid is invalid 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 within nested sequences behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on simple subpatterns behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block funcalls without extra arguments is expected to match code :a and s(:int, 1) with multiple arguments is expected to match code s(:str, "c"), "a", and "d" with one argument is expected to match code s(:str, "foo") and "foo" commas with commas randomly strewn around behaves like invalid is invalid in any order 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 invalid doubled with ellipsis behaves like invalid is invalid containing ellipsis not at the end behaves like invalid is invalid with an ellipsis inside and outside behaves like invalid is invalid nested behaves like invalid is invalid at the beginning of a sequence behaves like invalid is invalid doubled separated by an ellipsis behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block separated by fixed argument behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block without ellipsis with too few children behaves like nonmatching doesn't match with too many children 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 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 returns captured values if there is no block yields captured value(s) and returns true if there is a block nested behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 bare node type #== returns true iff the patterns are similar #dup is expected to match code s(:send, nil, :obj) and :method #pattern returns the pattern on a node with a matching, hyphenated type is expected to match code s(:lvasgn, :a), :+, and s(:int, 1) marshal compatibility is expected to match code s(:send, nil, :obj) and :method yaml compatibility is expected to match code s(:send, nil, :obj) and :method on a node with the same type is expected to match code s(:send, nil, :obj) and :method #to_s is instructive on a node with a different type behaves like nonmatching doesn't match captures on a wildcard nested in any child behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in 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 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 non-head position in a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in head position in a sequence against literal (bug #5470) behaves like nonmatching doesn't match at the root level behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block nil against a node pattern (bug #5470) behaves like nonmatching doesn't match nil value in AST, use nil? method is expected to match code nil and :foo nil value in AST behaves like nonmatching doesn't match nil literals is expected to match code repeated using + 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 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 using * with zero match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block nested with multiple subcaptures behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with matching children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with no match behaves like nonmatching doesn't match without capture is expected to match code s(:sym, :hello), s(:int, 1), s(:int, 2), and s(:int, 3) 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 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 using ? with zero match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with too many matching children behaves like nonmatching doesn't match 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 at beginning of sequence behaves like invalid is invalid with an ellipsis in the same sequence behaves like invalid is invalid wildcards named wildcards within a sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) within a sequence unifying the node type with an argument is expected to match code s(:send, nil, :obj) and :send with values which cannot be unified behaves like nonmatching doesn't match with values which can be unified is expected to match code s(:int, 5), :+, and s(:int, 5) within a union with a succeeding unifying constraint with branches without the wildcard encountered first behaves like invalid is invalid encountered after behaves like invalid is invalid with all branches with the wildcard that can not be unified behaves like nonmatching doesn't match matching another branch is expected to match code s(:array, s(:int, 2), s(:int, 1)) and s(:int, 2) matching the first branch is expected to match code s(:array, s(:int, 1), s(:int, 2)) and s(:int, 2) confined to the union with partial unification matching the unified branch is expected to match code s(:int, 5) and s(:int, 5) matching the free branch is expected to match code s(:int, 2) and s(:int, 1) that can not be unified behaves like nonmatching doesn't match without unification is expected to match code s(:int, 2) and s(:int, 1) with a preceding unifying constraint that can not be unified behaves like nonmatching doesn't match matching a branch is expected to match code s(:int, 2) and s(:array, s(:int, 2), s(:int, 1)) at the root level is expected to match code s(:sclass, s(:self), s(:def, :something, s(:args), s(:int, 1))) and :freeze in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) unnamed wildcards within a sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) at the root level is expected to match code s(:sclass, s(:self), s(:def, :something, s(:args), s(:int, 1))) and :freeze in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) negated behaves like nonmatching doesn't match within a sequence is expected to match code nil and :Const node type in seq head on a node with the same type is expected to match code s(:ivar, :@ivar), :+, and s(:int, 2) on a child with a different type behaves like nonmatching doesn't match for a child on a child with a different type behaves like nonmatching doesn't match on a child with the same type is expected to match code s(:send, nil, :foo) and :bar on a child litteral behaves like nonmatching doesn't match unions nested inside a sequence is expected to match code s(:const, nil, :Const) and :method at the top level containing mixed node and literals is expected to match code nil and :obj containing string literals is expected to match code s(:str, "a") and :upcase containing symbol literals when the AST does not have a matching symbol behaves like nonmatching doesn't match when the AST has a matching symbol is expected to match code s(:send, nil, :obj) and :b containing integer literals is expected to match code s(:int, 10) and :abs containing multiple [] on a node which meets some requirements but not all behaves like nonmatching doesn't match on a node which meets all requirements of the first [] is expected to match code 3 on a node which meets all requirements of the second [] is expected to match code 2.4 with a nested sequence is expected to match code s(:const, nil, :Const) and :method .descend yields all children depth first yields the given argument if it is not a Node predicates with an expression argument for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true is expected to match code s(:int, 2), :+, and s(:float, 2.0) with one extra argument for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true is expected to match code s(:send, s(:int, 1), :+, s(:int, 2)) and 1 at head position of a sequence is expected to match code s(:int, 1) and :inc with a named argument with extra arguments raises an error for which the predicate is false behaves like nonmatching doesn't match when not given raises an error for which the predicate is true is expected to match code s(:send, s(:int, 1), :+, s(:int, 2)) and {:param=>1} with a constant argument for which the predicate is false behaves like nonmatching doesn't match for which the predicate is true is expected to match code s(:int, 1), :+, and s(:int, 2) when negated is expected to match code s(:int, 1) and :inc applied to an integer for which the predicate is true is expected to match code s(:int, 1) and :inc applied to an integer for which the predicate is false behaves like nonmatching doesn't match when in last-child position, but all children have already been matched behaves like nonmatching doesn't match with multiple arguments for which the predicate is true is expected to match code s(:str, "c"), "a", and "d" for which the predicate is false behaves like nonmatching doesn't match when captured behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in root position is expected to match code s(:int, 1) and :inc with name containing a numeral is expected to match code s(:int, 1) and :inc ellipsis 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 behaves like nonmatching doesn't match with [] 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 set at the end, but no remaining child to match it behaves like nonmatching doesn't match preceding a capture 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 is expected to match code s(:int, 10), :*, and s(:int, 1) preceding multiple captures behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block negation when nested in complex ways with (send str :<< str) behaves like nonmatching doesn't match with (send str :+ (send str :to_i)) is expected to match code s(:str, "abc"), :+, and s(:send, s(:str, "1"), :to_i) with (send int :- int) is expected to match code s(:int, 1), :-, and s(:int, 1) on a sequence with a node with non-matching children is expected to match code :@b and s(:int, 1) with a matching node behaves like nonmatching doesn't match with a node of different type is expected to match code :@@a and s(:int, 1) on square brackets with a node which meets all requirements of [] behaves like nonmatching doesn't match with a node which meets only 1 requirement of [] is expected to match code 1 on a string with a non-matching symbol is expected to match code s(:str, "bar") and :upcase with a matching string behaves like nonmatching doesn't match on a set with a matching value behaves like nonmatching doesn't match with a non-matching value is expected to match code :@a and s(:int, 3) on a symbol with a non-matching symbol, but too many children behaves like nonmatching doesn't match with a non-matching symbol is expected to match code s(:send, nil, :obj) and :xyz with a matching symbol behaves like nonmatching doesn't match captures on ... with a remaining node type at the end behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a remaining capture at the end behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with 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 [] 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 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 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 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 after a child 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 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 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 captures which also perform a match on a node type behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a 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 on [] behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on a 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 yields captured value(s) and returns true if there is a block returns captured values if there is no block on a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block literals positive float literals is expected to match code 1.0 single quoted string literals is expected to match code "foo" negative integer literals is expected to match code -100 negative float literals is expected to match code -2.5 bare literal on a node behaves like nonmatching doesn't match on a matching literal is expected to match code :bar symbol literals is expected to match code :foo double quoted string literals is expected to match code "foo" RuboCop::AST::ArgsNode #empty_and_without_delimiters? 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 with arguments with a lambda literal is expected to equal false with a method definition 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 .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 RuboCop::AST::CaseMatchNode when using Ruby 2.7 or newer #in_pattern_branches is expected to eq 3 is expected to all be in pattern type .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 #each_in_pattern when not passed a block is expected to equal true when passed a block yields all the conditions #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" RuboCop::AST::StrNode #heredoc? with a normal string is expected to equal false with a string with interpolation is expected to equal false with a heredoc is expected to equal true .new with a normal string is expected to equal true with a heredoc is expected to equal true with a string with interpolation is expected to equal true RuboCop::AST::Token #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 .from_parser_token sets parser token's range to rubocop token's pos sets parser token's text to rubocop token's text returns a #to_s useful for debugging sets parser token's type to rubocop token's type #space_after returns nil when there is not a space after token returns truthy MatchData when there is a space after token #line returns line of token #to_s returns string of token data #column returns index of first char in token range on that line type predicates #left_array_bracket? returns false for non left_array_bracket tokens returns true for left_array_bracket tokens #comment? returns true for comment tokens returns false for non comment tokens #comma? returns true for comma tokens returns false for non comma tokens #semicolon? returns true for semicolon tokens returns false for non semicolon tokens #left_bracket? returns false for non left_bracket tokens returns true for all left_bracket tokens #end? returns false for non end tokens returns true for end tokens with braces & parens #left_brace? returns false for non left hash brace tokens returns true for left hash brace tokens #right_curly_brace? returns false for non right brace tokens returns true for all right brace tokens #right_parens? returns false for non right parens tokens returns true for right parens tokens #left_parens? returns true for left parens tokens returns false for non left parens tokens #left_curly_brace? returns true for left block brace tokens returns false for non left block brace tokens #equals_sign? returns false for non equals sign tokens returns true for equals sign tokens #left_ref_bracket? returns true for left_ref_bracket tokens returns false for non left_ref_bracket tokens #right_bracket? returns true for all right_bracket tokens returns false for non right_bracket tokens #left_brace? returns true for right_bracket tokens returns false for non right_bracket tokens #rescue_modifier? returns false for non rescue modifier tokens returns true for rescue modifier tokens #space_before returns nil when it is on the first line returns nil when there is not a space before token returns truthy MatchData when there is a space before token RuboCop::AST::ReturnNode behaves like wrapped arguments node .new without arguments is expected to equal true with arguments is expected to equal true #arguments with a single argument and braces is expected to eq 1 with a single argument is expected to eq 1 with a single splat argument is expected to eq 1 with no arguments is expected to equal true with multiple literal arguments is expected to eq 2 with no arguments and braces is expected to equal true RuboCop::AST::ConstNode #each_path yields all parts of the namespace #short_name is expected to eq :BAZ #module_name? is expected to eq false with a constant with a lowercase letter is expected to eq true #relative? with a non-namespaced constant is expected to eq true #absolute? is expected to eq true with a constant not starting with :: is expected to eq false with a non-namespaced constant is expected to eq false #namespace is expected to eq "::Foo::Bar" RuboCop::AST::DefinedNode .new with a defined? node is expected to equal true #receiver is expected to eq nil #method_name is expected to eq :defined? #arguments is expected to all be sym type is expected to eq 1 RuboCop::AST::IfNode #unless? with a ternary operator is expected to be falsey with an if statement is expected to be falsey with an unless statement is expected to be truthy #branches with an unless statement is expected to all be literal is expected to eq 1 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 #inverse_keyword? with an unless statement is expected to eq "if" with a ternary operator is expected to eq "" with an if statement is expected to eq "unless" #each_branch when passed a block yields all the branches when not passed a block is expected to equal true #nested_conditional? with nested conditionals in elsif clause is expected to be truthy with nested conditionals in else clause is expected to be truthy with nested conditionals in if clause is expected to be truthy with nested ternary operators when nested in the truthy branch is expected to be truthy when nested in the falsey branch is expected to be truthy with no nested conditionals is expected to be falsey #else_branch with a ternary operator is expected to equal true with an if statement is expected to equal true with an unless statement is expected to equal true #ternary? with an if statement is expected to be falsey with a ternary operator is expected to be truthy with an unless statement is expected to be falsey #elsif? with an if statement comtaining an elsif is expected to be falsey with an elsif statement is expected to be truthy without an elsif statement is expected to be falsey .new with a modifier statement is expected to equal true with a regular if statement is expected to equal true with a ternary operator is expected to equal true #modifier_form? with a non-modifier if statement 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 with a ternary operator is expected to be falsey #if? with an if statement is expected to be truthy with an unless statement is expected to be falsey with a ternary operator is expected to be falsey #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 #elsif_conditional? with one elsif conditional is expected to be truthy with multiple elsif conditionals is expected to be truthy with nested conditionals in if 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 with nested conditionals in else clause is expected to be falsey #else? with an elsif statement is expected to be truthy without an else statement is expected to be falsey #keyword with an if statement is expected to eq "if" with an unless statement is expected to eq "unless" with a ternary operator is expected to eq "" RuboCop::AST::YieldNode #assignment_method? is expected to be falsey #first_argument with no arguments is expected to equal true with multiple mixed arguments is expected to equal true with a single literal argument is expected to equal true with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true #self_receiver? is expected to be falsey #block_argument? is expected to be falsey #block_literal? is expected to be falsey #comparison_method? is expected to be falsey #block_node is expected to equal true #last_argument with a single literal argument is expected to equal true with multiple literal arguments is expected to equal true with a single splat argument is expected to equal true with multiple mixed arguments is expected to equal true with no arguments is expected to equal true #command? when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy #arguments? with multiple literal arguments is expected to be truthy with multiple mixed arguments is expected to be truthy with a single literal argument is expected to be truthy with no arguments is expected to be falsey with a single splat argument is expected to be truthy #setter_method? is expected to be falsey #macro? is expected to be falsey #predicate_method? is expected to be falsey #method_name is expected to eq :yield #bang_method? is expected to be falsey #arguments with multiple literal arguments is expected to eq 2 with a single splat argument is expected to eq 1 with no arguments is expected to equal true with a single literal argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 #camel_case_method? is expected to be falsey .new is expected to equal true #double_colon? is expected to be falsey #const_receiver? is expected to be falsey #receiver is expected to equal true #splat_argument? with mixed arguments is expected to be truthy with no arguments is expected to be falsey with regular arguments is expected to be falsey with a splat argument is expected to be truthy #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 #implicit_call? is expected to be falsey #operator_method? is expected to be falsey #dot? is expected to be falsey #method? when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey when message matches when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy RuboCop::AST::NextNode behaves like wrapped arguments node .new without arguments is expected to equal true with arguments is expected to equal true #arguments with a single argument is expected to eq 1 with a single splat argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true with no arguments and braces is expected to equal true with a single argument and braces is expected to eq 1 RuboCop::AST::OrNode #semantic_operator? with a semantic or node is expected to equal true with a logical or node is expected to equal false .new with a logical or node is expected to equal true with a semantic or node is expected to equal true #operator with a semantic or node is expected to eq "or" with a logical or node is expected to eq "||" #alternate_operator with a semantic or node is expected to eq "||" with a logical 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 #logical_operator? with a logical or node is expected to equal true with a semantic or node is expected to equal false #lhs with a logical or node is expected to equal true with a semantic or node is expected to equal true #inverse_operator with a semantic or node is expected to eq "and" with a logical or node is expected to eq "&&" RuboCop::AST::ForNode #keyword is expected to eq "for" #collection is expected to equal true #variable is expected to equal true #void_context? without a do keyword is expected to be truthy with a do keyword is expected to be truthy #do? without a do keyword is expected to be falsey with a do keyword is expected to be truthy .new is expected to equal true #body is expected to equal true #post_condition_loop? is expected to be falsey #loop_keyword? is expected to be truthy RuboCop::AST::EnsureNode .new is expected to equal true #body is expected to equal true Finished in 2.56 seconds (files took 1.17 seconds to load) 1441 examples, 0 failures Randomized with seed 3946 ┌──────────────────────────────────────────────────────────────────────────────┐ │ dh_ruby --install finished │ └──────────────────────────────────────────────────────────────────────────────┘ dh_installdocs -i -O--buildsystem=ruby dh_ruby_fixdocs -i -O--buildsystem=ruby debian/rules override_dh_installchangelogs make[1]: Entering directory '/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0' dh_installchangelogs CHANGELOG.md make[1]: Leaving directory '/build/ruby-rubocop-ast-p6bplW/ruby-rubocop-ast-0.6.0' dh_installsystemduser -i -O--buildsystem=ruby dh_perl -i -O--buildsystem=ruby dh_link -i -O--buildsystem=ruby dh_strip_nondeterminism -i -O--buildsystem=ruby dh_compress -X.rb -i -O--buildsystem=ruby dh_fixperms -i -O--buildsystem=ruby dh_missing -i -O--buildsystem=ruby dh_ruby_fixdepends -i -O--buildsystem=ruby dh_installdeb -i -O--buildsystem=ruby dh_gencontrol -i -O--buildsystem=ruby dpkg-gencontrol: warning: Depends field of package ruby-rubocop-ast: substitution variable ${shlibs:Depends} used, but is not defined dh_md5sums -i -O--buildsystem=ruby dh_builddeb -i -O--buildsystem=ruby dpkg-deb: building package 'ruby-rubocop-ast' in '../ruby-rubocop-ast_0.6.0-1_all.deb'. dpkg-genbuildinfo --build=all dpkg-genchanges --build=all >../ruby-rubocop-ast_0.6.0-1_all.changes dpkg-genchanges: info: binary-only arch-indep upload (source code and arch-specific packages not included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) I: running special hook: sync-out /build/ruby-rubocop-ast-p6bplW /tmp/ruby-rubocop-ast-0.6.0-1nf4r9aaw I: cleaning package lists and apt cache... I: creating tarball... I: done I: removing tempdir /tmp/mmdebstrap.jtLfqhnLCj... I: success in 2201.2490 seconds md5: ruby-rubocop-ast_0.6.0-1_all.deb: OK sha1: ruby-rubocop-ast_0.6.0-1_all.deb: OK sha256: ruby-rubocop-ast_0.6.0-1_all.deb: OK Checksums: OK