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-1yvxzl_y4/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/20211212T031254Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20211212T031254Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20211215T212228Z/ 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-1yvxzl_y4 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.1J5rHcpv7S 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.1J5rHcpv7S 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 (1035 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/20211212T031254Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20211212T031254Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20211215T212228Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211205T210857Z/ unstable main' >> /etc/apt/sources.list && apt-get update"' exec /tmp/mmdebstrap.1J5rHcpv7S Get:1 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm InRelease [129 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211215T212228Z unstable InRelease [165 kB] Hit:3 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable InRelease Ign:4 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main amd64 Packages Get:4 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main Sources [11.7 MB] Get:5 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main amd64 Packages [11.2 MB] Ign:6 http://snapshot.notset.fr/archive/debian/20211215T212228Z unstable/main amd64 Packages Err:6 http://snapshot.notset.fr/archive/debian/20211215T212228Z unstable/main amd64 Packages 404 Not Found [IP: 10.13.0.253 80] Ign:6 http://snapshot.notset.fr/archive/debian/20211215T212228Z unstable/main amd64 Packages Get:6 http://snapshot.notset.fr/archive/debian/20211215T212228Z unstable/main amd64 Packages [12.0 MB] Fetched 35.2 MB in 28s (1238 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.1J5rHcpv7S 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.1J5rHcpv7S 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/20211212T031254Z bookworm/main ruby-rubocop-ast 0.6.0-1 (dsc) [2161 B] Get:2 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main ruby-rubocop-ast 0.6.0-1 (tar) [93.4 kB] Get:3 http://snapshot.notset.fr/archive/debian/20211212T031254Z bookworm/main ruby-rubocop-ast 0.6.0-1 (diff) [2972 B] Fetched 98.5 kB in 0s (1218 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.1J5rHcpv7S 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/d20211216-90331-1d9aw5z/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/d20211216-90331-1d9aw5z/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 5351 RuboCop::AST::ForNode #collection is expected to equal true .new is expected to equal true #body is expected to equal true #loop_keyword? is expected to be truthy #void_context? with a do keyword is expected to be truthy without a do keyword is expected to be truthy #keyword is expected to eq "for" #post_condition_loop? is expected to be falsey #variable is expected to equal true #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey RuboCop::AST::ClassNode #identifier is expected to equal true .new is expected to equal true #body with a multi-expression body is expected to equal true with a single expression body is expected to equal true with an empty body is expected to equal nil #parent_class when no parent class is specified is expected to equal nil when a parent class is specified is expected to equal true RuboCop::AST::RescueNode #body is expected to equal true .new is expected to equal true #branches when there is no else keyword returns only then rescue bodies when there is an else returns all the bodies with an empty else returns all the bodies #else_branch with an else statement is expected to equal true without an else statement is expected to equal true #resbody_branches is expected to eq 2 is expected to all be resbody type #else? with an else statement is expected to be truthy without an else statement is expected to be falsey RuboCop::AST::SelfClassNode #body with a multi-expression body is expected to equal true with a single expression body is expected to equal true with an empty body is expected to equal nil .new is expected to equal true #identifier is expected to equal true RuboCop::AST::ProcessedSource #lines is an array has same number of elements as line count contains lines as string without linefeed #path is the path passed to .new #following_line returns source of line after token token enumerables #find_token yields nil when there is no match yields correct token #each_token yields all 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 valid_syntax? when a line starts with an integer literal tokenizes the source correctly 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 could not be parsed due to encoding error returns false when the source is invalid returns false when the source is valid but has some warning diagnostics returns true #start_with? with blank source returns false with present source returns false when passed string that does not start source returns true when passed string that starts source with heavily commented source #contains_comment? provided source_range on comment line is expected to equal true provided source_range on line with comment is expected to equal true provided source_range on line without comment is expected to equal false provided a multiline source_range with at least one line with comment is expected to equal true #find_comment yields nil when there is no match yields correct comment #comments_before_line returns comments on or before given line #comment_at_line returns nil if line has no comment returns the comment at the given line number #each_comment yields all comments #each_comment_in_lines yields the comments #line_with_comment? returns true for lines with comments returns false for lines without comments #tokens_within returns tokens for node accepts Node as an argument when heredoc as argument is present returns tokens for node before heredoc returns tokens for heredoc node returns tokens for node after heredoc #blank? with source of no content returns true with source with content returns false #last_token_of returns last token for node accepts Node as an argument #ast is the root node of AST #comments is an array of comments when the source is invalid returns [] .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 #first_token_of accepts Node as an argument returns first token for node #file_path returns file path #tokens has an array of tokens #preceding_line returns source of line before token #buffer is a source buffer #parser_error when the source could not be parsed due to encoding error returns the error when the source lacks encoding comment and is really utf-8 encoded but has been read as US-ASCII is nil when the source was properly parsed is nil RuboCop::AST::FloatNode #sign? explicit negative float is expected to be truthy explicit positive float is expected to be truthy #value is expected to eq 1.5 .new is expected to be truthy RuboCop::AST::CaseMatchNode when using Ruby 2.7 or newer #each_in_pattern when passed a block yields all the conditions when not passed a block is expected to equal true #keyword is expected to eq "case" .new is expected to equal true #else_branch #else? with an else statement is expected to equal true without an else statement is expected to equal true #else? with an else statement is expected to equal true without an else statement is expected to equal false #in_pattern_branches is expected to eq 3 is expected to all be in pattern type RuboCop::AST::NodePattern captures on a wildcard nested in any child behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in head position in a sequence against nil (bug #5470) behaves like nonmatching doesn't match in 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 at the root level behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in 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 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 negation 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 sequence with a matching node behaves like nonmatching doesn't match 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) when nested in complex ways with (send int :- int) is expected to match code s(:int, 1), :-, and s(:int, 1) 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 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 a set with a non-matching value is expected to match code :@a and s(:int, 3) with a matching value behaves like nonmatching doesn't match 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 node type for a child on a child litteral behaves like nonmatching doesn't match 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 in seq head on a child with a different type behaves like nonmatching doesn't match on a node with the same type is expected to match code s(:ivar, :@ivar), :+, and s(:int, 2) ellipsis with a wildcard at the end, but no remaining child to match it 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 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 with [] at the end, but no remaining child to match it behaves like nonmatching doesn't match preceding multiple captures behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a nodetype at the end, but no remaining child to match it behaves like nonmatching doesn't match preceding a capture behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block macros with a pattern without captures def_node_search without a predicate name when called on matching code returns an enumerator yielding the matches when it errors raises an error with the right location when called on non-matching code returns an enumerator yielding nothing 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 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 with a pattern with captures def_node_matcher when it errors raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match when called on matching code is expected to eq :hello def_node_search without a predicate name when called on non-matching code returns an enumerator yielding nothing when it errors raises an error with the right location when called on matching code returns an enumerator yielding the captures when the pattern contains keyword_params returns an enumerator yielding the captures when helper is called with default keyword_params is overriden when calling the matcher some defaults are not params raises an error and no value is given to the matcher uses the defaults 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 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 descend without match behaves like nonmatching doesn't match with an immediate match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block nested behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a match multiple levels, depth first behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a literal match 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)) params when preceded by ... is expected to match code s(:send, s(:int, 1), :+, s(:int, 10)) and s(:int, 10) when inside an intersection is expected to match code s(:int, 20), 10, and 20 as named parameters when provided as argument to match is expected to match code s(:int, 10) and {:foo=>#} when extra are provided raises an ArgumentError when not provided raises an ArgumentError when preceded by $... behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block when negated, with a nonmatching value is expected to match code s(:const, s(:const, nil, :Namespace), :B) and :A without explicit number is expected to match code s(:const, s(:const, nil, :Namespace), :A), :A, and s(:const, nil, :Namespace) when inside a union, with a nonmatching value behaves like nonmatching doesn't match in a nested sequence is expected to match code s(:send, s(:send, s(:int, 5), :dec), :inc), :inc, and :dec when inside a union, with a matching value is expected to match code s(:int, 10) and 10 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 # param number zero in a position which does not match original target node behaves like nonmatching doesn't match in a position which matches original target node is expected to match code 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 when negated, with a matching value behaves like nonmatching doesn't match bare node type yaml compatibility is expected to match code s(:send, nil, :obj) and :method marshal compatibility is expected to match code s(:send, nil, :obj) and :method #pattern returns the pattern on a node with a different type behaves like nonmatching doesn't match #== returns true iff the patterns are similar 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 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 commas with commas randomly strewn around behaves like invalid is invalid sequence with trailing ... on a node with fewer children, with a wildcard preceding behaves like nonmatching doesn't match on a node with the same type and fewer children behaves like nonmatching doesn't match on a node with non-matching children behaves like nonmatching doesn't match on a node with the same type and more children with 2 children more is expected to match code s(:int, 1), :blah, s(:int, 1), and s(:sym, :something) with 1 child more is expected to match code s(:int, 1), :blah, and s(:int, 1) 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 funcalls 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" without extra arguments is expected to match code :a and s(:int, 1) caret (ascend) inside a union is expected to match code "abc" 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 using unification to match self within parent with self in the wrong position behaves like nonmatching doesn't match with self in the right position is expected to match code 2 inside an intersection is expected to match code 1 repeated twice 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 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 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 using * with matching children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with multiple subcaptures behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block without capture is expected to match code s(:sym, :hello), s(:int, 1), s(:int, 2), and s(:int, 3) 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 returns captured values if there is no block yields captured value(s) and returns true if there is a block with no match 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 with an ellipsis in the same sequence behaves like invalid is invalid at beginning of sequence behaves like invalid is invalid using + with zero match behaves like nonmatching doesn't match 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 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 bad syntax with unmatched closing curly behaves like invalid is invalid with negated closing curly behaves like invalid is invalid with unmatched opening paren behaves like invalid is invalid with empty parentheses behaves like invalid is invalid with unmatched closing paren behaves like invalid is invalid with unmatched opening curly behaves like invalid is invalid with negated ellipsis behaves like invalid is invalid with doubled ellipsis behaves like invalid is invalid with doubled comma in arg list 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 closing paren behaves like invalid is invalid with empty union behaves like invalid is invalid with empty intersection behaves like invalid is invalid literals 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 positive float literals is expected to match code 1.0 symbol literals is expected to match code :foo double quoted string literals is expected to match code "foo" single quoted string literals is expected to match code "foo" negative integer literals is expected to match code -100 simple sequence on a node with the same type and matching children is expected to match code s(:int, 1), :+, and s(:int, 1) with a nested sequence in non-head position is expected to match code s(:send, s(:send, nil, :obj), :a) and :b on a node with too many children behaves like nonmatching doesn't match with a nested sequence in head position behaves like invalid is invalid on a node with the same type and non-matching children with non-matching selector behaves like nonmatching doesn't match with non-matching receiver type behaves like nonmatching doesn't match on a node with a different type behaves like nonmatching doesn't match nil nil value in AST behaves like nonmatching doesn't match nil literals is expected to match code 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 predicates 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 applied to an integer for which the predicate is true is expected to match code s(:int, 1) and :inc when captured behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a 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 a named argument when not given raises an error for which the predicate is false behaves like nonmatching doesn't match with extra arguments 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} 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 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) when negated is expected to match code s(:int, 1) and :inc 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 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 when in last-child position, but all children have already been matched behaves like nonmatching doesn't match at head position of a sequence is expected to match code s(:int, 1) and :inc captures which also perform a match when nested behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on a sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a node type behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on a set behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on [] behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a literal behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block captures on ... with a remaining capture at the end behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining node type at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining sequence at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block after a child behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with 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 at the very beginning of a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with no remaining pattern at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining [] 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 unions nested inside a sequence is expected to match code s(:const, nil, :Const) and :method with a nested 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 has a matching symbol is expected to match code s(:send, nil, :obj) and :b when the AST does not have a matching symbol behaves like nonmatching doesn't match containing mixed node and literals is expected to match code nil and :obj containing integer literals is expected to match code s(:int, 10) and :abs containing multiple [] 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 on a node which meets some requirements but not all behaves like nonmatching doesn't match comments behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block wildcards unnamed wildcards 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) 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 at the root level is expected to match code s(:sclass, s(:self), s(:def, :something, s(:args), s(:int, 1))) and :freeze named wildcards 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 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 sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) within a union with a succeeding unifying constraint with all branches with the wildcard that can not be unified behaves like nonmatching doesn't match matching another branch 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) with branches without the wildcard encountered after behaves like invalid is invalid encountered first behaves like invalid is invalid with a preceding unifying constraint matching a branch is expected to match code s(:int, 2) and s(:array, s(:int, 2), s(:int, 1)) that can not be unified behaves like nonmatching doesn't match 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) captures within union with complex nesting behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 with a different number of captures in each branch behaves like invalid is invalid .descend yields the given argument if it is not a Node yields all children depth first in any order with an ellipsis behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block captured without ellipsis behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a captured ellipsis matching all children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block nested behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block matching non sequential children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block 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 invalid containing ellipsis not at the end behaves like invalid is invalid with an ellipsis inside and outside behaves like invalid is invalid at the beginning of a sequence behaves like invalid is invalid doubled with ellipsis behaves like invalid is invalid nested behaves like invalid is invalid doubled separated by an ellipsis behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block separated by fixed argument behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block RuboCop::AST::NextNode behaves like wrapped arguments node .new with arguments is expected to equal true without arguments is expected to equal true #arguments with a single splat argument is expected to eq 1 with no arguments is expected to equal true with a single argument and braces is expected to eq 1 with a single 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::SuperNode #block_literal? with a block literal is expected to be truthy with a block argument is expected to be falsey with no block is expected to be falsey #receiver is expected to equal true #block_node with a block argument is expected to equal true with a block literal is expected to equal true with no block is expected to equal true #dot? is expected to be falsey #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 multiple literal arguments is expected to be truthy with multiple mixed arguments is expected to be truthy with a single splat argument is expected to be truthy #bang_method? is expected to be falsey #parenthesized? with arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey with no arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy #macro? is expected to be falsey #comparison_method? is expected to be falsey #block_argument? with regular arguments is expected to be falsey with mixed arguments is expected to be truthy with no arguments is expected to be falsey with a block argument is expected to be truthy #double_colon? is expected to be falsey #camel_case_method? is expected to be falsey #implicit_call? is expected to be falsey .new with a zsuper node is expected to equal true with a super node is expected to equal true #self_receiver? is expected to be falsey #method_name is expected to eq :super #operator_method? is expected to be falsey #last_argument with multiple literal arguments is expected to equal true with no arguments is expected to equal true with a single splat argument is expected to equal true with multiple mixed arguments is expected to equal true with a single literal argument is expected to equal true #splat_argument? 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 with mixed arguments is expected to be truthy #setter_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 symbol is expected to be truthy when argument is a string is expected to be truthy #const_receiver? is expected to be falsey #command? when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy #arguments with a single literal argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true with a single splat argument is expected to eq 1 #assignment_method? is expected to be falsey #first_argument with a single splat argument is expected to equal true with a single literal argument is expected to equal true with multiple mixed arguments is expected to equal true with no arguments is expected to equal true with multiple literal arguments is expected to equal true RuboCop::AST::BlockNode #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 #arguments? 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 with multiple mixed arguments is expected to be truthy >= Ruby 2.7 using numbered parameters is expected to equal false #closing_delimiter when enclosed in do-end keywords is expected to eq "end" when enclosed in braces is expected to eq "}" #keywords? when enclosed in do-end keywords is expected to be truthy when enclosed in braces is expected to be falsey #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 #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 no arguments is expected to equal true with a single literal argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 with a single splat argument is expected to eq 1 >= Ruby 2.7 using numbered parameters is expected to equal true #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 #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 #opening_delimiter when enclosed in do-end keywords is expected to eq "do" when enclosed in braces is expected to eq "{" #braces? when enclosed in braces is expected to be truthy when enclosed in do-end keywords is expected to be falsey RuboCop::AST::IntNode #value is expected to eq 10 .new is expected to be truthy #sign? explicit positive int is expected to be truthy explicit negative int is expected to be truthy RuboCop::AST::Ext::Range #line_span returns the range of lines a range occupies accepts an `exclude_end` keyword argument RuboCop::AST::ForwardArgsNode when using Ruby 2.7 or newer #to_a is expected to contain exactly (be forward arg type) RuboCop::AST::SymbolNode #value is expected to eq :foo .new with a symbol node is expected to equal true RuboCop::AST::EnsureNode #body is expected to equal true .new is expected to equal true RuboCop::AST::KeywordSplatNode #operator is expected to eq "**" #value is expected to eq s(:kwsplat, s(:send, nil, :foo)) #key is expected to eq s(:kwsplat, s(:send, nil, :foo)) #hash_rocket? is expected to be falsey #colon? is expected to be falsey #value_delta when using colon 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 when using hash rocket delimiters when keyword splat is ahead is expected to eq 0 when keyword splat is behind is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is left aligned is expected to eq 0 .new is expected to equal true #key_delta with alignment set to :right when using colon delimiters when keyword splat is behind is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is aligned is expected to eq 0 when 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 aligned is expected to eq 0 when keyword splat is behind is expected to eq 0 with alignment set to :left when using colon delimiters when keyword splat is aligned is expected to eq 0 when keyword splat is 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 using hash rocket delimiters when keyword splat is behind is expected to eq -2 when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 2 when keyword splat is aligned is expected to eq 0 #same_line? when pairs are on separate lines is expected to be falsey when a multiline pair shares the same line is expected to be truthy is expected to be truthy when both pairs are on the same line is expected to be truthy RuboCop::AST::WhileNode #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey #post_condition_loop? with a modifier while is expected to be truthy with a statement while is expected to be falsey .new with a statement while is expected to equal true with a modifier while is expected to equal true #inverse_keyword is expected to eq "until" #loop_keyword? with a modifier while is expected to be truthy with a statement while is expected to be truthy #keyword is expected to eq "while" RuboCop::AST::LambdaNode #method_name is expected to eq :lambda #receiver is expected to eq nil #arguments is expected to eq 2 RuboCop::AST::WhenNode #branch_index is expected to eq 0 is expected to eq 1 is expected to eq 2 .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 all be literal is expected to eq 3 #then? without a then keyword is expected to be falsey with a then keyword is expected to be truthy #body without a then keyword is expected to equal true with a then keyword is expected to equal true #each_condition when not passed a block is expected to equal true when passed a block yields all the conditions RuboCop::AST::ArrayNode #bracketed? with square brackets is expected to equal true unbracketed is expected to equal nil with a percent literal is expected to equal true #each_value without block is expected to equal true with block is expected to eq ["(int 1)", "(int 2)", "(int 3)"] is expected to equal true #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 #values with an empty array is expected to equal true with an array of literals is expected to eq 3 is expected to all be literal with an array of variables is expected to eq 2 is expected to all be send type #percent_literal? with square brackets is expected to be falsey is expected to be falsey is expected to be falsey with a symbol percent literal is expected to be 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 RuboCop::AST::PairNode #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 pairs are on separate lines when last pair is a keyword splat is expected to be falsey when both pairs are explicit pairs is expected to be falsey when both pairs are on the same line when both pair is a keyword splat is expected to be truthy when both pairs are explicit pairs is expected to be truthy when a multiline pair shares the same line when last pair is a keyword splat is expected to be truthy is expected to be truthy when both pairs are explicit pairs is expected to be truthy is expected to be truthy #delimiter when using a hash rocket delimiter is expected to eq "=>" is expected to eq " => " when using a colon delimiter is expected to eq ":" is expected to eq ": " #value_delta when using colon delimiters when both pairs are on the same line is expected to eq 0 when values are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver value is behind is expected to eq -2 when receiver value is ahead is expected to eq 2 when using hash rocket delimiters when receiver value is 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 #hash_rocket? when using a hash rocket delimiter is expected to be truthy when using a colon delimiter is expected to be falsey #inverse_delimiter when using a hash rocket delimiter is expected to eq ":" is expected to eq ": " when using a colon delimiter is expected to eq " => " is expected to eq "=>" #value_on_new_line? when pair is on a single line is expected to be falsey when value starts on a new line is expected to be truthy when value spans multiple lines is expected to be falsey #key when using a symbol key is expected to equal true when using a string key is expected to equal true .new is expected to equal true #value is expected to equal true #key_delta with alignment set to :left when using colon delimiters when both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is behind when second pair is a keyword splat is expected to eq -2 when both pairs are reail pairs is expected to eq -2 when keys are aligned when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 2 when using hash rocket delimiters when receiver key is behind when both pairs are explicit pairs is expected to eq -2 when second pair is a keyword splat is expected to eq -2 when keys are aligned when second key is a keyword splat is expected to eq 0 when both keys are explicit keys is expected to eq 0 when both keys are on the same line when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 2 with alignment set to :right when using hash rocket delimiters when receiver key is behind when both pairs are explicit pairs is expected to eq -2 when second pair is a keyword splat is expected to eq 0 when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 0 when both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when keys are aligned when both keys are explicit keys is expected to eq 0 when second key is a keyword splat is expected to eq 0 when using colon delimiters when keys are aligned when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when receiver key is ahead when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 2 when both keys are on the same line when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is behind when both pairs are reail pairs is expected to eq -2 when second pair is a keyword splat is expected to eq 0 RuboCop::AST::DefNode .new with a defs node is expected to equal true with a def node is expected to equal true #block_argument? with mixed arguments is expected to be truthy 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 #body with no body is expected to equal true with a single expression body is expected to equal true with a multi-expression body is expected to equal true #predicate_method? with a bang method is expected to be falsey with a regular method is expected to be falsey with a predicate method is expected to be truthy #first_argument with a single regular argument is expected to equal true with a single keyword argument is expected to equal true with no arguments is expected to equal true with a single rest argument is expected to equal true with multiple mixed arguments is expected to equal true with multiple regular arguments is expected to equal true #method_name with an operator method is expected to eq :== with a plain method is expected to eq :foo with a unary method is expected to eq :-@ with a setter method is expected to eq :foo= #assignment_method? with a bracket assignment method is expected to be truthy 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 #comparison_method? with a comparison method is expected to be truthy with a regular method is expected to be falsey #arguments with a single regular argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 with multiple regular arguments is expected to eq 2 with no arguments is expected to equal true with argument forwarding is expected to eq 1 with a single rest argument is expected to eq 1 #last_argument with no 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 multiple regular arguments is expected to equal true with a single keyword argument is expected to equal true with a single rest argument is expected to equal true #method? when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey #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 #arguments? with multiple mixed arguments is expected to be truthy with a single rest argument is expected to be truthy with multiple regular arguments is expected to be truthy with a single regular argument is expected to be truthy with no arguments is expected to be falsey with a single keyword argument 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 #operator_method? with a unary operator method is expected to be truthy with a regular method is expected to be falsey with a binary operator method is expected to be truthy with a setter method is expected to be falsey #self_receiver? with a singleton method definition is expected to be falsey with an instance method definition is expected to be falsey with a class method definition is expected to be truthy when using Ruby 2.7 or newer #argument_forwarding? is expected to be truthy #rest_argument? with a rest argument is expected to be truthy with no arguments is expected to be falsey with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #receiver with a singleton method definition is expected to equal true with an instance method definition is expected to equal true with a class method definition is expected to equal true #void_context? with a regular assignment method is expected to be truthy with a regular method is expected to be falsey with an initializer method is expected to be truthy with a bracket assignment method is expected to be truthy with a comparison 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 RuboCop::AST::Node #recursive_basic_literal? behaves like non literal returns false for `(x or false)` behaves like non literal returns false for `(x == false)` behaves like literal returns true for `(false <=> true)` behaves like literal returns true for `[1, 2, 3]` behaves like literal returns true for `/./` behaves like literal returns true for `"#{2}"` behaves like non literal returns false for `%r{abx#{foo}}ixo` behaves like non literal returns false for `/.#{some_method_call}/` behaves like literal returns true for `!true` behaves like non literal returns false for `{ :sym => some_method_call }` behaves like literal returns true for `{ :a => 1, :b => 2 }` behaves like literal returns true for `1.0` behaves like non literal returns false for `[some_method_call]` behaves like literal returns true for `nil` behaves like non literal returns false for `{ some_method_call => :sym }` behaves like literal returns true for `'str'` behaves like non literal returns false for `some_method_call(x, y)` behaves like literal returns true for `(1)` behaves like literal returns true for `%r{abx}ixo` behaves like non literal returns false for `(x && false)` behaves like literal returns true for `false` behaves like non literal returns false for `some_method_call` behaves like literal returns true for `{ a: 1, b: 2 }` behaves like literal returns true for `1` behaves like literal returns true for `(false && true)` behaves like literal returns true for `(false or true)` #module_definition? included module definition matches with Module.new matches with ::ModuleName matches using module keyword matches namespaced modules matches prepend Module.new matches nested modules matches sibling_access returns trivial values for a root node for a node with siblings returns the expected values for a single child returns the expected values #pure? for an ivar assignment returns false for an array literal which contains a method call returns false with only literal children returns true for a gvar assignment returns false for an integer literal returns true for a regexp with interpolated segments returns false with options returns true with no interpolation returns true for an lvar assignment returns false for a cvar assignment returns false for a class definition returns false for a module definition returns false for a nested if where the innermost descendants are local vars and literals returns true where one branch contains a method call returns false where one branch contains an assignment statement returns false for a method call returns false for a hash literal with only literal children returns true which contains a method call returns false #class_constructor? class definition does not match class definition with a block matches module definition with a block matches class definition on outer scope matches #class_definition? without inheritance matches with Class.new matches constant defined as Struct without block does not match with inheritance matches with self singleton class matches with ::ClassName matches namespaced class matches with Struct matches with object singleton class matches #value_used? at the end of a block is always true within an if...else..end node at the top level is true only for the condition nested in a method call is always true within a module definition node is always true within a while node is true only for the condition within a method call node is always true within an array literal at the top level is always false assigned to an ivar is always true within a singleton class node is always true within a class definition node is always true at the top level is false #struct_constructor? struct definition with a block matches struct definition without block does not match ::Struct matches #argument_type? block arguments returns true for all argument types method arguments returns true for all argument types RuboCop::AST::CaseNode .new is expected to equal true #else_branch #else? without an else statement is expected to equal true with an else statement is expected to equal true #else? with an else statement is expected to be truthy without an else statement is expected to be falsey #each_when when not passed a block is expected to equal true when passed a block yields all the conditions #branches when compared to an IfNode returns the same when there is no else keyword returns only then when bodies when there is an else returns all the bodies with an empty else returns all the bodies #when_branches is expected to all be when type is expected to eq 3 #keyword is expected to eq "case" RuboCop::AST::DefinedNode #method_name is expected to eq :defined? .new with a defined? node is expected to equal true #receiver is expected to eq nil #arguments is expected to all be sym type is expected to eq 1 RuboCop::AST::YieldNode #setter_method? is expected to be falsey #macro? is expected to be falsey #double_colon? is expected to be falsey #assignment_method? is expected to be falsey #method? when message does not match when argument is a symbol is expected to be falsey when argument is a string is expected to be falsey when message matches when argument is a symbol is expected to be truthy when argument is a string is expected to be truthy #const_receiver? is expected to be falsey .new is expected to equal true #self_receiver? is expected to be falsey #predicate_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 #operator_method? is expected to be falsey #implicit_call? is expected to be falsey #bang_method? is expected to be falsey #comparison_method? is expected to be falsey #block_argument? is expected to be falsey #block_node is expected to equal true #dot? is expected to be falsey #splat_argument? with mixed arguments is expected to be truthy 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 #first_argument with multiple mixed 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 no arguments is expected to equal true with a single splat argument is expected to equal true #method_name is expected to eq :yield #block_literal? is expected to be falsey #last_argument with a single literal argument is expected to equal true with no arguments is expected to equal true with multiple literal arguments is expected to equal true with multiple mixed arguments is expected to equal true with a single splat argument is expected to equal true #receiver is expected to equal true #camel_case_method? is expected to be falsey #arguments? with multiple mixed arguments is expected to be truthy with multiple literal arguments is expected to be truthy with no arguments is expected to be falsey with a single literal argument is expected to be truthy with a single splat argument 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 #arguments with multiple mixed arguments is expected to eq 2 with a single literal argument is expected to eq 1 with no arguments is expected to equal true with a single splat argument is expected to eq 1 with multiple literal arguments is expected to eq 2 RuboCop::AST::RangeNode .new with an exclusive range is expected to equal true is expected to equal true with an infinite range is expected to equal true is expected to equal true with a beignless range is expected to equal true is expected to equal true with an inclusive range is expected to equal true is expected to equal true RuboCop::AST::RegexpNode #no_encoding? with other options is expected to equal false with no options is expected to equal false with n and other options is expected to equal true with only n option is expected to equal true #delimiters with %r/-delimiters is expected to eq ["/", "/"] with /-delimiters is expected to eq ["/", "/"] with %r<-delimiters is expected to eq ["<", ">"] with multi-line %r{-delimiters is expected to eq ["{", "}"] with %r{-delimiters is expected to eq ["{", "}"] #percent_r_literal? with %r{-delimiters is expected to eq true with /-delimiters is expected to eq false with %r/-delimiters is expected to eq true with %r<-delimiters is expected to eq true with multi-line %r{-delimiters is expected to eq true #interpolation? with no interpolation returns false is expected to eq false with direct variable interpoation is expected to eq true with regexp quote is expected to eq true #ignore_case? with only i option is expected to equal true with i and other options is expected to equal true with no options is expected to equal false with other options is expected to equal false #slash_literal? with %r<-delimiters is expected to eq false with %r/-delimiters is expected to eq false with /-delimiters is expected to eq true with multi-line %r{-delimiters is expected to eq false with %r{-delimiters is expected to eq false #content with a regexp without option is expected to eq ".+" with an empty regexp is expected to eq "" with a multi-line regexp with option is expected to eq "\n.+\n" 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" #delimiter? with multi-line %r{-delimiters is expected to eq true is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false with %r<-delimiters is expected to eq false is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq false with %r{-delimiters is expected to eq false is expected to eq false is expected to eq true is expected to eq true is expected to eq false is expected to eq false is expected to eq false is expected to eq false with %r/-delimiters is expected to eq false is expected to eq 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 true is expected to eq false #options with a regexp with "o" option is expected to eq 0 with a regexp with single option is expected to eq 1 with a regexp without option is expected to eq 0 with a regexp with multiple options is expected to eq 3 with an empty regexp is expected to eq 0 #extended? with only x option is expected to equal true with x and other options is expected to equal true with other options is expected to equal false with no options is expected to equal false #multiline_mode? with m and other options is expected to equal true with no options is expected to equal false with only m option is expected to equal true with other options is expected to equal false .new 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 a multi-line regexp with option is expected to equal true is expected to eq [:i, :m, :x] with a regexp with option is expected to eq [:i, :m, :x] 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 is expected to equal true is expected to equal true with an empty regexp with option is expected to eq [:i, :x] is expected to equal true with a regexp without option is expected to equal true is expected to equal true #to_regexp with an empty regexp is expected to eq // with a regexp without option is expected to eq /.+/ with a regexp with option is expected to eq /.+/mix with an empty regexp with option is expected to eq //ix with a multi-line regexp without option is expected to eq / .+ / with a regexp with an "o" option is expected to eq "/abc/i" with a multi-line regexp with option is expected to eq / .+ /ix Set#=== tests for inclusion RuboCop::AST::ResbodyNode #branch_index is expected to eq 0 is expected to eq 1 is expected to eq 2 #exception_variable for an implicit rescue is expected to eq "ex" for an explicit rescue is expected to eq "ex" when an exception variable is not given is expected to equal nil .new is expected to equal true #body is expected to equal true #exceptions without exception is expected to eq 0 with multiple exceptions is expected to eq 2 is expected to all be const type with a single exception is expected to all be const type 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::SendNode #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? when message matches when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy when message does not match when argument is a symbol is expected to be falsey when argument is a string is expected to be falsey #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 #post_condition_loop? is expected to equal false #lambda? with a non-lambda method is expected to be falsey with a lambda method is expected to be truthy with a stabby lambda method is expected to be truthy with a method named lambda in a class is expected to be falsey #block_argument? with mixed arguments is expected to be truthy with regular arguments is expected to be falsey with no arguments is expected to be falsey with a block argument is expected to be truthy #binary_operation?? with a unary operation is expected to equal false with a binary operation is expected to equal true with a regular method call is expected to equal false with an implicit call method is expected to equal false #bare_access_modifier? when node has an argument is expected to be falsey when node is not an access modifier is expected to be falsey when node is a bare `module_function` is expected to be truthy #unary_operation? with a unary operation is expected to equal true with a binary operation is expected to equal false with a regular method call is expected to equal false with an implicit call method is expected to equal false #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 method definition is expected to be falsey when parent is a keyword begin inside of an class is expected to be truthy when parent is a block not in a macro scope is expected to be falsey when in an if 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 without a parent is expected to be truthy when parent is a module is expected to be truthy when parent is a class constructor is expected to be truthy when parent is a singleton class is expected to be truthy 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 block in a macro scope is expected to be truthy #loop_keyword? is expected to equal false #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 #self_receiver? with a self receiver is expected to be truthy with an implicit receiver is expected to be falsey with a non-self receiver is expected to be falsey #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 #nonmutating_unary_operator_method? with a nonmutating unary operator method is expected to be truthy with a regular method is expected to be falsey #prefix_not? with a bang method is expected to be falsey with a non-negated method is expected to be falsey with keyword `not` is expected to be truthy #arguments? with multiple mixed 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 multiple literal arguments is expected to be truthy with no arguments is expected to be falsey #bang_method? with a predicate method is expected to be falsey with a bang method is expected to be truthy with a regular method is expected to be falsey #prefix_bang? with a non-negated method is expected to be falsey with keyword `not` is expected to be falsey with a bang 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 #negation_method? with prefix bang is expected to be truthy with suffix `not` is expected to be falsey with prefix `not` is expected to be truthy with a non-negated method is expected to be falsey #last_argument with multiple mixed arguments is expected to equal true with no arguments is expected to equal true with a single literal argument is expected to equal true with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true #dot? with a double colon is expected to be falsey with a unary method is expected to be falsey with a dot is expected to be truthy without a dot is expected to be falsey #def_modifier? with several prefixed def modifiers is expected to be truthy with a prefixed def modifier is expected to be truthy #non_bare_access_modifier? when node is a non-bare `module_function` is expected to be truthy when node is not an access modifier is expected to be falsey when node does not have an argument is expected to be falsey .new with a safe navigation method send is expected to equal true with a regular method send is expected to equal true #parenthesized? with arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey with no arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy #first_argument with a single splat argument is expected to equal true with a single literal argument is expected to equal true with no arguments is expected to equal true with multiple literal arguments is expected to equal true with multiple mixed arguments is expected to equal true #nonmutating_operator_method? with a nonmutating binary operator method is expected to be truthy with a regular method is expected to be falsey with a mutating binary operator method is expected to be falsey with a nonmutating unary operator method is expected to be truthy #attribute_accessor? with an accessor returns the accessor method and Array] with a call without arguments is expected to equal nil #double_colon? with a dot is expected to be falsey with a double colon is expected to be truthy without a dot is expected to be falsey with a unary method is expected to be falsey #command? when argument is a symbol with an implicit receiver is expected to be truthy with an explicit receiver is expected to be falsey when argument is a string with an implicit receiver is expected to be truthy with an explicit receiver is expected to be falsey #camel_case_method? with a regular method is expected to be falsey with a camel case method is expected to be truthy #implicit_call? with an implicit call method is expected to be truthy with a regular method is expected to be falsey with an explicit call method is expected to be falsey #nonmutating_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 #access_modifier? when node is a non-bare `module_function` is expected to be truthy when node is a bare `module_function` is expected to be truthy when node is not an access modifier is expected to be falsey #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 #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 #operator_method? with a unary operator method is expected to be truthy with a binary operator method is expected to be truthy with a regular method is expected to be falsey with a setter method is expected to be falsey #enumerable_method? with an enumerable method is expected to be truthy with a regular method is expected to be falsey #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 #setter_method? with an operator method is expected to be falsey with a setter method is expected to be truthy with an indexed setter method is expected to be truthy with a regular method is expected to be falsey #method_name with a setter method is expected to eq :bar= with an implicit call method is expected to eq :call with a plain method is expected to eq :bar with an operator method is expected to eq :== #splat_argument? with a splat argument is expected to be truthy with no arguments is expected to be falsey with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #lambda_literal? with a lambda method is expected to equal false 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 #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 #comparison_method? with a comparison method is expected to be truthy with a negation method is expected to be falsey with a regular method is expected to be falsey #predicate_method? with a regular method is expected to be falsey with a bang method is expected to be falsey with a predicate method is expected to be truthy #arguments with a single splat argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 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 RuboCop::AST::UntilNode #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 modifier until is expected to be truthy with a statement until is expected to be truthy #inverse_keyword is expected to eq "while" #do? without a do keyword is expected to be falsey with a do keyword is expected to be truthy #keyword is expected to eq "until" .new with a modifier until is expected to equal true with a statement until is expected to equal true RuboCop::AST::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 semantic or node is expected to equal true with a logical or node is expected to equal true #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 semantic or node is expected to equal false 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" #inverse_operator with a semantic or node is expected to eq "and" with a logical or node is expected to eq "&&" #alternate_operator with a logical or node is expected to eq "or" with a semantic or node is expected to eq "||" #lhs with a semantic or node is expected to equal true with a logical or node is expected to equal true RuboCop::AST::ConstNode #relative? with a non-namespaced constant is expected to eq true #each_path yields all parts of the namespace #namespace is expected to eq "::Foo::Bar" #absolute? is expected to eq true with a non-namespaced constant is expected to eq false with a constant not starting with :: is expected to eq false #module_name? is expected to eq false with a constant with a lowercase letter is expected to eq true #short_name is expected to eq :BAZ 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::AliasNode #new_identifier is expected to eq :foo is expected to equal true #old_identifier is expected to equal true is expected to eq :bar .new is expected to equal true RuboCop::AST::AndNode #alternate_operator with a semantic and node is expected to eq "&&" with a logical and node is expected to eq "and" #inverse_operator with a semantic and node is expected to eq "or" with a logical and node is expected to eq "||" #operator with a logical and node is expected to eq "&&" with a semantic and node is expected to eq "and" .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 #logical_operator? with a semantic and node is expected to equal false with a logical 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 #semantic_operator? with a logical and node is expected to equal false with a semantic and node is expected to equal true RuboCop::AST::Token #end_pos returns index of last char in token range of entire source #space_before returns truthy MatchData when there is a space before token returns nil when it is on the first line returns nil when there is not a space before token type predicates #left_array_bracket? returns true for left_array_bracket tokens returns false for non left_array_bracket tokens #rescue_modifier? returns true for rescue modifier tokens returns false for non rescue modifier tokens #equals_sign? returns true for equals sign tokens returns false for non equals sign tokens #comment? returns false for non comment tokens returns true for comment tokens #left_ref_bracket? returns false for non left_ref_bracket tokens returns true for left_ref_bracket tokens #left_bracket? returns true for all left_bracket tokens returns false for non left_bracket tokens #comma? returns false for non comma tokens returns true for comma tokens #semicolon? returns false for non semicolon tokens returns true for semicolon tokens #left_brace? returns true for right_bracket tokens returns false for non right_bracket tokens #right_bracket? returns true for all right_bracket tokens returns false for non right_bracket tokens #end? returns false for non end tokens returns true for end tokens with braces & parens #left_brace? returns true for left hash brace tokens returns false for non left hash brace tokens #right_parens? returns true for right parens tokens returns false for non right parens tokens #right_curly_brace? returns false for non right brace tokens returns true for all right brace tokens #left_parens? returns false for non left parens tokens returns true for left parens tokens #left_curly_brace? returns true for left block brace tokens returns false for non left block brace tokens #column returns index of first char in token range on that line .from_parser_token sets parser token's text to rubocop token's text returns a #to_s useful for debugging sets parser token's range to rubocop token's pos sets parser token's type to rubocop token's type #line returns line of token #to_s returns string of token data #space_after returns truthy MatchData when there is a space after token returns nil when there is not a space after token #begin_pos returns index of first char in token range of entire source RuboCop::AST::IfNode #branches with an if statement is expected to all be literal is expected to eq 1 with an unless statement is expected to all be literal is expected to eq 1 with an else statement is expected to all be literal is expected to eq 2 with an elsif statement is expected to all be literal is expected to eq 3 #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 #unless? with a ternary operator is expected to be falsey with an unless statement is expected to be truthy with an if statement is expected to be falsey #each_branch when passed a block yields all the branches when not passed a block is expected to equal true #else? with an elsif statement is expected to be truthy without an else statement is expected to be falsey #else_branch with an if statement is expected to equal true with a ternary operator is expected to equal true with an unless statement is expected to equal true #ternary? with an unless statement is expected to be falsey with a ternary operator is expected to be truthy with an if statement is expected to be falsey #nested_conditional? 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 no nested conditionals is expected to be falsey with nested conditionals in else clause is expected to be truthy with nested conditionals in elsif clause is expected to be truthy with nested conditionals in if clause is expected to be truthy #elsif? with an elsif statement is expected to be truthy without an elsif statement is expected to be falsey with an if statement comtaining an elsif is expected to be falsey #if? with an unless statement is expected to be falsey with a ternary operator is expected to be falsey with an if statement is expected to be truthy .new with a regular if statement is expected to equal true with a modifier statement is expected to equal true with a ternary operator is expected to equal true #inverse_keyword? with an unless statement is expected to eq "if" with an if statement is expected to eq "unless" with a ternary operator is expected to eq "" #modifier_form? with a non-modifier unless statement is expected to be falsey with a ternary operator is expected to be falsey with a modifier unless statement is expected to be truthy with a modifier if statement is expected to be truthy with a non-modifier if statement is expected to be falsey #keyword with an unless statement is expected to eq "unless" with a ternary operator is expected to eq "" with an if statement is expected to eq "if" #elsif_conditional? with nested conditionals in else clause is expected to be falsey with nested ternary operators when nested in the falsey branch is expected to be falsey when nested in the truthy branch is expected to be falsey 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 RuboCop::AST::ModuleNode .new is expected to equal true #body with an empty body is expected to equal nil with a multi-expression body is expected to equal true with a single expression body is expected to equal true #identifier is expected to equal true RuboCop::AST::BreakNode behaves like wrapped arguments node #arguments with no arguments and braces is expected to equal true with a single argument is expected to eq 1 with no arguments is expected to equal true with a single splat argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with a single argument and braces is expected to eq 1 .new with arguments is expected to equal true without arguments is expected to equal true RuboCop::AST::HashNode #each_key when passed a block yields all the pairs when not passed a block is expected to equal true #values with a hash with string keys is expected to all be send type is expected to eq 2 with an empty hash is expected to equal true with a hash with literal values is expected to eq 3 is expected to all be literal #each_value when not passed a block is expected to equal true when passed a block yields all the pairs .new is expected to equal true #pairs with an empty hash is expected to equal true with a hash of literals is expected to all be pair type is expected to eq 3 with a hash of variables is expected to all be pair type is expected to eq 2 #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 all be str type is expected to eq 2 with an empty hash is expected to equal true with a hash with symbol keys is expected to all be sym type is expected to eq 3 #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 #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 pairs are using different delimiters is expected to be truthy when all pairs are using a hash rocket delimiter 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 RuboCop::AST::ReturnNode behaves like wrapped arguments node #arguments with no arguments and braces is expected to equal true with a single splat argument is expected to eq 1 with a single argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true with a single argument and braces is expected to eq 1 .new with arguments is expected to equal true without arguments is expected to equal true RuboCop::AST::ArgsNode .new with a block is expected to equal true with a method definition is expected to equal true with a lambda literal is expected to equal true #empty_and_without_delimiters? with empty arguments with a 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 block is expected to equal false with a method definition is expected to equal false Finished in 1.28 seconds (files took 1.24 seconds to load) 1441 examples, 0 failures Randomized with seed 5351 /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 16119 RuboCop::AST::DefinedNode .new with a defined? node is expected to equal true #arguments is expected to all be sym type is expected to eq 1 #method_name is expected to eq :defined? #receiver is expected to eq nil RuboCop::AST::SuperNode #camel_case_method? is expected to be falsey #block_argument? with mixed arguments is expected to be truthy with a block argument is expected to be truthy with regular arguments is expected to be falsey with no arguments 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 #bang_method? is expected to be falsey #method? when message matches when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy when message does not match when argument is a string is expected to be falsey when argument is a symbol is expected to be falsey #predicate_method? 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 not using parentheses is expected to be falsey when using parentheses is expected to be truthy #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 #method_name is expected to eq :super .new with a super node is expected to equal true with a zsuper node is expected to equal true #receiver is expected to equal true #implicit_call? is expected to be falsey #double_colon? is expected to be falsey #comparison_method? is expected to be falsey #splat_argument? with a splat argument is expected to be truthy with mixed arguments is expected to be truthy with no arguments is expected to be falsey with regular arguments is expected to be falsey #setter_method? is expected to be falsey #self_receiver? is expected to be falsey #arguments with multiple literal arguments is expected to eq 2 with multiple mixed arguments is expected to eq 2 with a single literal argument is expected to eq 1 with a single splat argument is expected to eq 1 with no arguments is expected to equal true #block_node with a block argument is expected to equal true with a block literal is expected to equal true with no block is expected to equal true #first_argument with multiple mixed arguments is expected to equal true with no arguments is expected to equal true with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true with a single literal argument is expected to equal true #operator_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 mixed arguments is expected to be truthy with multiple literal arguments is expected to be truthy #last_argument with no arguments is expected to equal true with multiple literal arguments is expected to equal true with a single splat argument is expected to equal true with a single literal argument is expected to equal true with multiple mixed arguments is expected to equal true #const_receiver? is expected to be falsey #dot? is expected to be falsey #assignment_method? is expected to be falsey RuboCop::AST::FloatNode .new is expected to be truthy #value is expected to eq 1.5 #sign? explicit negative float is expected to be truthy explicit positive float is expected to be truthy RuboCop::AST::AndNode #operator with a semantic and node is expected to eq "and" with a logical and node is expected to eq "&&" #inverse_operator with a logical and node is expected to eq "||" with a semantic and node is expected to eq "or" #alternate_operator with a logical and node is expected to eq "and" with a semantic and node is expected to eq "&&" #lhs with a semantic and node is expected to equal true with a logical and node is expected to equal true #logical_operator? with a semantic and node is expected to equal false with a logical and node is expected to equal true #semantic_operator? with a logical and node is expected to equal false with a semantic and node is expected to equal true .new with a logical and node is expected to equal true with a semantic and node 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 RuboCop::AST::ArrayNode #each_value without block is expected to equal true with block is expected to eq ["(int 1)", "(int 2)", "(int 3)"] is expected to equal true #percent_literal? with a string percent literal is expected to be falsey is expected to be truthy is expected to be truthy 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 #square_brackets? with square brackets is expected to be truthy with a percent literal is expected to be falsey #bracketed? with square brackets is expected to equal true with a percent literal is expected to equal true unbracketed is expected to equal nil .new is expected to equal true #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 RuboCop::AST::RangeNode .new with a beignless range is expected to equal true is expected to equal true with an infinite range is expected to equal true is expected to equal true with an 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::ArgsNode #empty_and_without_delimiters? with delimiters with a block is expected to equal false with a method definition is expected to equal false with a lambda literal is expected to equal false with empty arguments with a block is expected to equal true with a method definition is expected to equal true with a lambda literal is expected to equal true with arguments with a lambda literal is expected to equal false with a method definition 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::IfNode #if_branch with an unless statement is expected to equal true with a ternary operator is expected to equal true with an if statement is expected to equal true #else_branch with an if statement is expected to equal true with a ternary operator is expected to equal true with an unless statement is expected to equal true #elsif_conditional? with one elsif conditional is expected to be truthy with multiple elsif conditionals is expected to be truthy with nested ternary operators when nested in the truthy branch is expected to be falsey when nested in the falsey branch is expected to be falsey with nested conditionals in else clause is expected to be falsey with nested conditionals in if clause is expected to be falsey #branches with an elsif statement is expected to all be literal is expected to eq 3 with an if 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 unless statement is expected to all be literal is expected to eq 1 #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" #nested_conditional? with nested conditionals in elsif clause is expected to be truthy with no nested conditionals is expected to be falsey with nested ternary operators when nested in the falsey branch is expected to be truthy when nested in the truthy branch is expected to be truthy with nested conditionals in else clause is expected to be truthy with nested conditionals in if clause is expected to be truthy #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 "" #else? with an elsif statement is expected to be truthy without an else statement is expected to be falsey #each_branch when passed a block yields all the branches when not passed a block is expected to equal true #elsif? without an elsif statement is expected to be falsey with an elsif statement is expected to be truthy with an if statement comtaining an elsif is expected to be falsey #if? with a ternary operator is expected to be falsey with an if statement is expected to be truthy with an unless statement is expected to be falsey #unless? with a ternary operator is expected to be falsey with an unless statement is expected to be truthy with an if statement is expected to be falsey .new with a ternary operator is expected to equal true with a regular if statement is expected to equal true with a modifier statement is expected to equal true #modifier_form? with a ternary operator is expected to be falsey with a modifier unless statement is expected to be truthy with a non-modifier unless statement is expected to be falsey with a modifier if statement is expected to be truthy with a non-modifier if statement is expected to be falsey #ternary? with an unless statement is expected to be falsey with a ternary operator is expected to be truthy with an if statement is expected to be falsey RuboCop::AST::UntilNode #keyword is expected to eq "until" #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey #inverse_keyword is expected to eq "while" #post_condition_loop? with a modifier until is expected to be truthy with a statement until is expected to be falsey #loop_keyword? with a statement until is expected to be truthy with a modifier until is expected to be truthy .new with a modifier until is expected to equal true with a statement until is expected to equal true RuboCop::AST::IntNode .new is expected to be truthy #value is expected to eq 10 #sign? explicit positive int is expected to be truthy explicit negative int is expected to be truthy RuboCop::AST::RegexpNode #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 #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 with single option is expected to eq 1 with a regexp without option is expected to eq 0 with a regexp with "o" option is expected to eq 0 with a regexp with multiple options is expected to eq 3 #no_encoding? with only n option is expected to equal true with no options is expected to equal false with n and other options is expected to equal true with other options is expected to equal false #ignore_case? with no options is expected to equal false with i and other options is expected to equal true with only i option is expected to equal true with other options is expected to equal false #regopt with an empty regexp with option is expected to eq [:i, :x] is expected to equal true with a regexp with option is expected to equal true is expected to eq [:i, :m, :x] with a multi-line regexp without option is expected to equal true is expected to equal true with a regexp without option is expected to equal true is expected to equal true with an empty regexp is expected to equal true is expected to equal true with a multi-line regexp with option is expected to equal true is expected to eq [:i, :m, :x] #delimiters with /-delimiters is expected to eq ["/", "/"] with %r/-delimiters is expected to eq ["/", "/"] with %r{-delimiters is expected to eq ["{", "}"] with %r<-delimiters is expected to eq ["<", ">"] with multi-line %r{-delimiters is expected to eq ["{", "}"] #delimiter? with %r/-delimiters is expected to eq false is expected to eq false is expected to eq false is expected to eq false is expected to eq true is expected to eq false is expected to eq false with /-delimiters 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 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 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 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 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 #content with an empty regexp with option is expected to eq "" with a regexp without option is expected to eq ".+" with a regexp with option is expected to eq ".+" with an empty regexp 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" #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 #to_regexp with a regexp with an "o" option is expected to eq "/abc/i" with an empty regexp with option is expected to eq //ix with a multi-line regexp without option is expected to eq / .+ / with an empty regexp is expected to eq // with a regexp without option is expected to eq /.+/ with a regexp with option is expected to eq /.+/mix with a multi-line regexp with option is expected to eq / .+ /ix #multiline_mode? with m and other options is expected to equal true with only m option is expected to equal true with other options is expected to equal false with no options is expected to equal false .new is expected to equal true #slash_literal? with %r/-delimiters is expected to eq false with multi-line %r{-delimiters is expected to eq false with %r{-delimiters is expected to eq false with /-delimiters is expected to eq true with %r<-delimiters is expected to eq false #extended? with x and other options is expected to equal true with only x option is expected to equal true with other options is expected to equal false with no options is expected to equal false RuboCop::AST::HashNode #each_pair when passed a block yields all the pairs when not passed a block is expected to equal true #keys 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 with a hash with symbol keys is expected to all be sym type is expected to eq 3 #pairs with a hash of literals is expected to all be pair type is expected to eq 3 with an empty hash is expected to equal true with a hash of variables is expected to all be pair type is expected to eq 2 #values with a hash with literal values is expected to all be literal is expected to eq 3 with a hash with string keys is expected to eq 2 is expected to all be send type with an empty hash is expected to equal true #empty? with a hash containing pairs is expected to equal false with a hash containing a keyword splat is expected to equal false with an empty hash is expected to equal true #braces? with braces is expected to be truthy as an argument with braces is expected to be truthy as an argument with no braces is expected to be falsey #each_key when not passed a block is expected to equal true when passed a block yields all the pairs #each_value when passed a block yields all the pairs when not passed a block is expected to equal true #pairs_on_same_line? with some pairs on the same line 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 .new is expected to equal true #mixed_delimiters? when pairs are using different delimiters is expected to be truthy when all pairs are using a colon delimiter is expected to be falsey when all pairs are using a hash rocket delimiter is expected to be falsey RuboCop::AST::AliasNode .new is expected to equal true #new_identifier is expected to eq :foo is expected to equal true #old_identifier is expected to eq :bar is expected to equal true RuboCop::AST::NodePattern unions at the top level 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 mixed node and literals is expected to match code nil and :obj 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 string literals is expected to match code s(:str, "a") and :upcase 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 nil 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 literals is expected to match code nil value in AST behaves like nonmatching doesn't match captures on ... with a remaining literal at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block at the very beginning of a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining sequence at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining set at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block after a child behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with remaining patterns at the end behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a remaining node type at the end behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a remaining [] 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 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 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 params as named parameters when extra are provided raises an ArgumentError when not provided raises an ArgumentError when provided as argument to match is expected to match code s(:int, 10) and {:foo=>#} 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 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 negated, with a nonmatching value is expected to match code s(:const, s(:const, nil, :Namespace), :B) and :A param number zero in a position which does not match original target node behaves like nonmatching doesn't match in a position which matches original target node is expected to match code 1 when inside a union, with a matching value is expected to match code s(:int, 10) and 10 when preceded by $... behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in 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 preceded by ... is expected to match code s(:send, s(:int, 1), :+, s(:int, 10)) and s(:int, 10) simple sequence on a node with the same type and non-matching children with non-matching selector behaves like nonmatching doesn't match with non-matching receiver type behaves like nonmatching doesn't match on a node with a different type behaves like nonmatching doesn't match with a nested sequence in head position behaves like invalid is invalid with a nested sequence in non-head position is expected to match code s(:send, s(:send, nil, :obj), :a) and :b 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 predicates when captured behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block when in last-child position, but all children have already been matched behaves like nonmatching doesn't match with one extra argument for which the predicate is true is expected to match code s(:send, s(:int, 1), :+, s(:int, 2)) and 1 for which the predicate is false behaves like nonmatching doesn't match 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 with a constant argument for which the predicate is true is expected to match code s(:int, 1), :+, and s(:int, 2) 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 false 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 at head position of a sequence is expected to match code s(:int, 1) and :inc with a named argument for which the predicate is false behaves like nonmatching doesn't match with extra arguments 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} when not given raises an error applied to an integer for which the predicate is true is expected to match code s(:int, 1) and :inc when negated is expected to match code s(:int, 1) and :inc macros with a pattern without captures def_node_matcher when called on matching code is expected to match code :hello when it errors raises an error with the right location when called on non-matching code behaves like nonmatching doesn't match def_node_search without a predicate name when it errors raises an error with the right location when called on matching code returns an enumerator yielding the matches when called on non-matching code returns an enumerator yielding nothing 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 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 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 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 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 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 a wildcard in head position in a sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block 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 a nested sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block in non-head position in a sequence behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in head position in a sequence against nil (bug #5470) behaves like nonmatching doesn't match at the root level behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block in head position in a sequence against literal (bug #5470) behaves like nonmatching doesn't match 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 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 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 bare node type on a node with a different type behaves like nonmatching doesn't match #to_s is instructive #pattern returns the pattern on a node with a matching, hyphenated type is expected to match code s(:lvasgn, :a), :+, and s(:int, 1) on a node with the same type is expected to match code s(:send, nil, :obj) and :method marshal compatibility is expected to match code s(:send, nil, :obj) and :method #== returns true iff the patterns are similar #dup is expected to match code s(:send, nil, :obj) and :method yaml compatibility is expected to match code s(:send, nil, :obj) and :method 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 without ellipsis with too many children behaves like nonmatching doesn't match with too few children behaves like nonmatching doesn't match with matching children behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block doubled separated by fixed argument behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block separated by an ellipsis behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a captured ellipsis matching all children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block matching non sequential children behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 invalid containing ellipsis not at the end behaves like invalid is invalid nested behaves like invalid is invalid doubled with ellipsis behaves like invalid is invalid at the beginning of a sequence behaves like invalid is invalid with an ellipsis inside and outside behaves like invalid is invalid .descend yields all children depth first yields the given argument if it is not a Node bad syntax with unmatched closing curly behaves like invalid is invalid with leading comma in arg list behaves like invalid is invalid with doubled comma in arg list behaves like invalid is invalid with empty intersection behaves like invalid is invalid with negated closing paren behaves like invalid is invalid with negated ellipsis behaves like invalid is invalid with negated closing curly behaves like invalid is invalid with empty parentheses behaves like invalid is invalid with unmatched opening paren behaves like invalid is invalid with unmatched opening curly behaves like invalid is invalid with empty union behaves like invalid is invalid with doubled ellipsis behaves like invalid is invalid with unmatched opening paren and `...` behaves like invalid is invalid with unmatched closing paren behaves like invalid is invalid wildcards unnamed wildcards in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) 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 within a sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) within a sequence is expected to match code nil and :Const named wildcards 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 sequence with other patterns intervening is expected to match code :@abc and s(:int, 22) within a union with a succeeding unifying constraint with all branches with the wildcard matching the first branch is expected to match code s(:array, s(:int, 1), s(:int, 2)) and s(:int, 2) matching another branch is expected to match code s(:array, s(:int, 2), s(:int, 1)) and s(:int, 2) that can not be unified behaves like nonmatching doesn't match with branches without the wildcard encountered first behaves like invalid is invalid encountered after behaves like invalid is invalid 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 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)) in head position of a sequence is expected to match code s(:int, 1), :+, and s(:send, nil, :a) within a sequence 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) with values which cannot be unified 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 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 on a child litteral behaves like nonmatching doesn't match literals bare literal on a matching literal is expected to match code :bar on a node behaves like nonmatching doesn't match negative integer literals is expected to match code -100 single quoted string literals is expected to match code "foo" negative float literals is expected to match code -2.5 symbol 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 negation 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 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 matching node behaves like nonmatching doesn't match 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) on a set with a non-matching value is expected to match code :@a and s(:int, 3) with a matching value behaves like nonmatching doesn't match on a symbol 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 with a non-matching symbol, but too many children behaves like nonmatching doesn't match on square brackets with a node which meets all requirements of [] behaves like nonmatching doesn't match with a node which meets only 1 requirement of [] is expected to match code 1 repeated using ? with zero match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with too many matching children behaves like nonmatching doesn't match behaves like repeated pattern at beginning of sequence behaves like invalid is invalid with one match behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with an ellipsis in the same sequence behaves like invalid is invalid using + with matching children behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with zero match behaves like 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 using * 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 no match behaves like nonmatching doesn't match nested with multiple subcaptures behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with multiple subcaptures behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block behaves like repeated pattern 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 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 caret (ascend) repeated twice is expected to match code 1 inside a union is expected to match code "abc" inside an intersection is expected to match code 1 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 used with a node type which matches is expected to match code 1 which doesn't match behaves like nonmatching doesn't match descend with an immediate match behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block 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 without match behaves like nonmatching doesn't match nested behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block with a 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)) funcalls 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" without extra arguments is expected to match code :a and s(:int, 1) 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 ellipsis with a nested sequence at the end, but no remaining child behaves like nonmatching doesn't match preceding multiple captures behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a wildcard at the end, but no remaining child to match it behaves like nonmatching doesn't match with [] at the end, but no remaining child to match it behaves like nonmatching doesn't match 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 yields captured value(s) and returns true if there is a block returns captured values if there is no block with a nodetype at the end, but no remaining child to match it behaves like nonmatching doesn't match at the very beginning of a sequence is expected to match code s(:int, 10), :*, and s(:int, 1) captures which also perform a match 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 when nested behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a set behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a sequence behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block on [] behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on a node type behaves like single capture yields captured value(s) and returns true if there is a block returns captured values if there is no block captures within union with complex nesting behaves like multiple capture yields captured value(s) and returns true if there is a block returns captured values if there is no block on simple subpatterns behaves like single capture returns captured values if there is no block yields captured value(s) and returns true if there is a block with a different number of captures in each branch behaves like invalid is invalid within nested sequences behaves like multiple capture returns captured values if there is no block yields captured value(s) and returns true if there is a block RuboCop::AST::SendNode #arithmetic_operation? with a unary numeric operation is expected to be falsey with a binary arithmetic operation is expected to be truthy with a regular method call is expected to be falsey #prefix_bang? with a non-negated method is expected to be falsey with keyword `not` is expected to be falsey with a bang method is expected to be truthy #nonmutating_unary_operator_method? with a regular method is expected to be falsey with a nonmutating unary operator method is expected to be truthy #arguments? 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 with a single literal argument is expected to be truthy with no arguments is expected to be falsey #assignment_method? with a bracket assignment method is expected to be truthy with a comparison method is expected to be falsey with a regular method is expected to be falsey with an assignment method is expected to be truthy #setter_method? with a regular method is expected to be falsey with an operator method is expected to be falsey with a setter method is expected to be truthy with an indexed setter method is expected to be truthy #nonmutating_string_method? with a nonmutating String method is expected to be truthy with a mutating String method is expected to be falsey with a regular method is expected to be falsey #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 #bare_access_modifier? when node is not an access modifier is expected to be falsey when node is a bare `module_function` is expected to be truthy when node has an argument 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 #block_node with a block argument is expected to equal true with a block literal is expected to equal true with no block is expected to equal true #const_receiver? with a non-constant receiver is expected to be falsey with a self receiver is expected to be falsey with a constant receiver is expected to be truthy #access_modifier? when node is a non-bare `module_function` is expected to be truthy when node is not an access modifier is expected to be falsey when node is a bare `module_function` is expected to be truthy #nonmutating_binary_operator_method? with a regular method is expected to be falsey with a mutating binary operator method is expected to be falsey with a nonmutating binary operator method is expected to be truthy #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 #operator_method? with a setter method is expected to be falsey 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 #comparison_method? with a comparison method is expected to be truthy with a regular method is expected to be falsey with a negation method is expected to be falsey #splat_argument? with a splat argument is expected to be truthy with regular arguments is expected to be falsey with no arguments is expected to be falsey with mixed arguments is expected to be truthy #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 #negation_method? with a non-negated method is expected to be falsey with prefix bang is expected to be truthy with suffix `not` is expected to be falsey with prefix `not` is expected to be truthy #def_modifier? with a prefixed def modifier is expected to be truthy with several prefixed def modifiers is expected to be truthy #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 #nonmutating_operator_method? with a nonmutating binary operator method is expected to be truthy with a mutating binary operator method is expected to be falsey with a nonmutating unary operator method is expected to be truthy with a regular method is expected to be falsey #macro? without a receiver when parent is a keyword begin inside of an class is expected to be truthy without a parent is expected to be truthy when in the global scope is expected to be truthy when parent is a block in a macro scope is expected to be truthy when parent is a class constructor is expected to be truthy when the condition of an if is expected to be falsey when parent is a method definition is expected to be falsey when parent is a begin without a parent is expected to be truthy when parent is a block not in a macro scope is expected to be falsey when parent is a module is expected to be truthy when parent is a class is expected to be truthy when in an if is expected to be truthy when parent is a singleton class is expected to be truthy with a receiver when parent is a class is expected to be falsey when parent is a module is expected to be falsey #nonmutating_array_method? with a regular method is expected to be falsey with a mutating Array method is expected to be falsey with a nonmutating Array method is expected to be truthy #lambda_literal? with a non-lambda method is expected to be falsey with a lambda method is expected to equal false with a stabby lambda is expected to equal true with `a.() {}` style method is expected to be falsey #post_condition_loop? is expected to equal false #arguments with multiple mixed arguments is expected to eq 2 with a single splat argument is expected to eq 1 with no arguments is expected to equal true with a single literal argument is expected to eq 1 with multiple literal arguments is expected to eq 2 #attribute_accessor? with an accessor returns the accessor method and Array] with a call without arguments is expected to equal nil .new with a regular method send is expected to equal true with a safe navigation method send 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 #block_argument? with a block argument is expected to be truthy with regular arguments is expected to be falsey with mixed arguments is expected to be truthy with no arguments is expected to be falsey #predicate_method? with a regular method is expected to be falsey with a predicate method is expected to be truthy with a bang method is expected to be falsey #double_colon? with a dot is expected to be falsey with a double colon is expected to be truthy with a unary method is expected to be falsey without a dot is expected to be falsey #parenthesized? with arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy with no arguments when not using parentheses is expected to be falsey when using parentheses is expected to be truthy #last_argument with multiple literal arguments is expected to equal true with no arguments is expected to equal true with a single splat argument is expected to equal true with a single literal argument is expected to equal true with multiple mixed arguments is expected to equal true #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 #prefix_not? with a bang method is expected to be falsey with a non-negated method is expected to be falsey with keyword `not` is expected to be truthy #unary_operation? with an implicit call method is expected to equal false with a binary operation is expected to equal false with a regular method call is expected to equal false with a unary operation is expected to equal true #command? when argument is a symbol with an explicit receiver is expected to be falsey with an implicit receiver is expected to be truthy when argument is a string with an implicit receiver is expected to be truthy with an explicit receiver is expected to be falsey #bang_method? with a predicate method is expected to be falsey with a bang method is expected to be truthy with a regular method is expected to be falsey #dot? without a dot is expected to be falsey with a dot is expected to be truthy with a unary method is expected to be falsey with a double colon is expected to be falsey #binary_operation?? with an implicit call method is expected to equal false with a binary operation is expected to equal true with a unary operation is expected to equal false with a regular method call is expected to equal false #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 #lambda? with a non-lambda method is expected to be falsey with a stabby lambda method is expected to be truthy with a lambda method is expected to be truthy with a method named lambda in a class is expected to be falsey #block_literal? with a block literal is expected to be truthy with a block argument is expected to be falsey with no block is expected to be falsey #self_receiver? with a non-self receiver is expected to be falsey with an implicit receiver is expected to be falsey with a self receiver is expected to be truthy #enumerable_method? with an enumerable method is expected to be truthy with a regular method is expected to be falsey RuboCop::AST::CaseMatchNode when using Ruby 2.7 or newer #else_branch #else? with an else statement is expected to equal true without an else statement is expected to equal true .new is expected to equal true #keyword is expected to eq "case" #in_pattern_branches is expected to all be in pattern type is expected to eq 3 #each_in_pattern when 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 RuboCop::AST::WhileNode #inverse_keyword is expected to eq "until" #loop_keyword? with a statement while is expected to be truthy with a modifier while is expected to be truthy #post_condition_loop? with a statement while is expected to be falsey with a modifier while is expected to be truthy #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey .new with a modifier while is expected to equal true with a statement while is expected to equal true #keyword is expected to eq "while" RuboCop::AST::YieldNode #implicit_call? is expected to be falsey #splat_argument? with no arguments is expected to be falsey with mixed arguments is expected to be truthy with a splat argument is expected to be truthy with regular arguments is expected to be falsey #macro? is expected to be falsey #receiver is expected to equal true #comparison_method? is expected to be falsey #camel_case_method? is expected to be falsey #arguments with multiple literal arguments is expected to eq 2 with multiple mixed arguments is expected to eq 2 with no arguments is expected to equal true with a single splat argument is expected to eq 1 with a single literal argument is expected to eq 1 #parenthesized? with arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey with no arguments when using parentheses is expected to be truthy when not using parentheses is expected to be falsey .new is expected to equal true #arguments? with a single literal argument is expected to be truthy with multiple literal arguments is expected to be truthy with no arguments is expected to be falsey with multiple mixed arguments is expected to be truthy with a single splat argument is expected to be truthy #operator_method? is expected to be falsey #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 #command? when argument is a string is expected to be truthy when argument is a symbol is expected to be truthy #block_node is expected to equal true #predicate_method? is expected to be falsey #last_argument with a single splat argument is expected to equal true with multiple literal arguments is expected to equal true with 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 #self_receiver? is expected to be falsey #method_name is expected to eq :yield #bang_method? is expected to be falsey #block_literal? is expected to be falsey #first_argument with no arguments is expected to equal true with multiple literal arguments is expected to equal true with 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 #const_receiver? is expected to be falsey #block_argument? is expected to be falsey #setter_method? is expected to be falsey #assignment_method? is expected to be falsey RuboCop::AST::ModuleNode .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::SymbolNode .new with a symbol node is expected to equal true #value is expected to eq :foo RuboCop::AST::OrNode #inverse_operator with a logical or node is expected to eq "&&" with a semantic or node is expected to eq "and" #semantic_operator? with a semantic or node is expected to equal true with a logical or node is expected to equal false #alternate_operator with a logical or node is expected to eq "or" with a semantic or node is expected to eq "||" #operator with a logical or node is expected to eq "||" with a semantic or node is expected to eq "or" .new with a logical or node is expected to equal true with a semantic or node is expected to equal true #rhs with a semantic or node is expected to equal true with a logical or node is expected to equal true #logical_operator? with a semantic or node is expected to equal false with a logical or node is expected to equal true #lhs with a semantic or node is expected to equal true with a logical or node is expected to equal true RuboCop::AST::Token .from_parser_token sets parser token's type to rubocop token's type sets parser token's text to rubocop token's text sets parser token's range to rubocop token's pos returns a #to_s useful for debugging #line returns line of token #to_s returns string of token data #begin_pos returns index of first char in token range of entire source #space_before returns nil when there is not a space before token returns truthy MatchData when there is a space before token returns nil when it is on the first line #space_after returns nil when there is not a space after token returns truthy MatchData when there is a space after token type predicates #end? returns true for end tokens returns false for non end tokens #left_bracket? returns true for all left_bracket tokens returns false for non left_bracket tokens #left_ref_bracket? returns true for left_ref_bracket tokens returns false for non left_ref_bracket tokens #right_bracket? returns false for non right_bracket tokens returns true for all right_bracket tokens with braces & parens #right_parens? returns false for non right parens tokens returns true for right parens tokens #left_brace? returns true for left hash brace tokens returns false for non left hash brace tokens #right_curly_brace? returns true for all right brace tokens returns false for non right brace tokens #left_parens? returns false for non left parens tokens returns true for left parens tokens #left_curly_brace? returns false for non left block brace tokens returns true for left block brace tokens #equals_sign? returns true for equals sign tokens returns false for non equals sign tokens #comma? returns false for non comma tokens returns true for comma tokens #left_brace? returns false for non right_bracket tokens returns true for right_bracket tokens #rescue_modifier? returns false for non rescue modifier tokens returns true for rescue modifier tokens #semicolon? returns true for semicolon tokens returns false for non semicolon tokens #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 #end_pos returns index of last char in token range of entire source #column returns index of first char in token range on that line RuboCop::AST::Node 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 matches struct definition with a block matches struct definition without block does not match #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 while node is true only for the condition 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 singleton class node is always true at the top level is false within a module definition node is always true within a class definition node is always true #pure? for an array literal which contains a method call returns false with only literal children returns true for an integer literal returns true for a class definition returns false for a nested if where the innermost descendants are local vars and literals returns true where one branch contains a method call returns false where one branch contains an assignment statement returns false for a module definition returns false for a regexp with interpolated segments returns false with options returns true with no interpolation returns true for an lvar assignment returns false for a gvar assignment returns false for an ivar assignment returns false for a cvar assignment returns false for a hash literal which contains a method call returns false with only literal children returns true for a method call returns false #class_definition? with ::ClassName matches without inheritance matches with Struct matches with inheritance matches with self singleton class matches namespaced class matches with object singleton class matches constant defined as Struct without block does not match with Class.new matches #recursive_basic_literal? behaves like non literal returns false for `/.#{some_method_call}/` behaves like literal returns true for `{ a: 1, b: 2 }` behaves like literal returns true for `!true` behaves like literal returns true for `/./` behaves like literal returns true for `%r{abx}ixo` behaves like non literal returns false for `some_method_call` behaves like literal returns true for `(false <=> true)` behaves like literal returns true for `1` behaves like literal returns true for `(false && true)` behaves like non literal returns false for `(x && false)` behaves like literal returns true for `(1)` behaves like non literal returns false for `some_method_call(x, y)` behaves like non literal returns false for `{ some_method_call => :sym }` behaves like non literal returns false for `{ :sym => some_method_call }` behaves like non literal returns false for `[some_method_call]` behaves like literal returns true for `{ :a => 1, :b => 2 }` behaves like literal returns true for `[1, 2, 3]` behaves like non literal returns false for `(x == false)` behaves like literal returns true for `'str'` behaves like literal returns true for `(false or true)` behaves like literal returns true for `false` behaves like literal returns true for `"#{2}"` behaves like literal returns true for `nil` behaves like non literal returns false for `%r{abx#{foo}}ixo` behaves like literal returns true for `1.0` behaves like non literal returns false for `(x or false)` #argument_type? block arguments returns true for all argument types method arguments returns true for all argument types #class_constructor? class definition does not match class definition with a block matches class definition on outer scope matches module definition with a block matches #module_definition? with ::ModuleName matches nested modules matches included module definition matches using module keyword matches namespaced modules matches with Module.new matches prepend Module.new matches RuboCop::AST::PairNode #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 "=>" #same_line? when pairs are on separate lines when last pair is a keyword splat is expected to be falsey when both pairs are explicit pairs is expected to be falsey when a multiline pair shares the same line when last pair is a keyword splat is expected to be truthy is expected to be truthy when both pairs are explicit pairs is expected to be truthy is expected to be truthy when both pairs are on the same line when both pair is a keyword splat is expected to be truthy when both pairs are explicit pairs is expected to be truthy #key_delta with alignment set to :left when using colon delimiters when receiver key is ahead when both pairs are explicit pairs is expected to eq 2 when second pair is a keyword splat is expected to eq 2 when receiver key is behind when second pair is a keyword splat is expected to eq -2 when both pairs are reail pairs is expected to eq -2 when keys are aligned when 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 second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when using hash rocket delimiters when receiver key is ahead when second pair is a keyword splat is expected to eq 2 when both pairs are explicit pairs is expected to eq 2 when both keys are on the same line when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when 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 with alignment set to :right when using colon delimiters when receiver key is behind when both pairs are reail pairs is expected to eq -2 when 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 second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 0 when receiver key is ahead when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq 2 when using hash rocket delimiters when both keys are on the same line when both pairs are explicit pairs is expected to eq 0 when second pair is a keyword splat is expected to eq 0 when keys are aligned when both keys are explicit keys is expected to eq 0 when second key is a keyword splat is expected to eq 0 when receiver key is behind when second pair is a keyword splat is expected to eq 0 when both pairs are explicit pairs is expected to eq -2 when 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 #delimiter when using a colon delimiter is expected to eq ": " is expected to eq ":" when using a hash rocket delimiter is expected to eq " => " is expected to eq "=>" .new is expected to equal true #colon? when using a colon delimiter is expected to be truthy when using a hash rocket delimiter is expected to be falsey #value is expected to equal true #hash_rocket? when using a hash rocket delimiter is expected to be truthy when using a colon delimiter is expected to be falsey #value_delta when using hash rocket delimiters when both pairs are on the same line is expected to eq 0 when receiver value is behind is expected to eq -2 when receiver value is ahead is expected to eq 2 when values are aligned when 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 both pairs are on the same line is expected to eq 0 when receiver value is ahead is expected to eq 2 when receiver value is behind is expected to eq -2 when 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 #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 #key when using a symbol key is expected to equal true when using a string key is expected to equal true RuboCop::AST::BreakNode behaves like wrapped arguments node #arguments with multiple literal arguments is expected to eq 2 with a single argument and braces is expected to eq 1 with no arguments is expected to equal true with no arguments and braces is expected to equal true with a single splat argument is expected to eq 1 with a single argument is expected to eq 1 .new without arguments is expected to equal true with arguments is expected to equal true RuboCop::AST::LambdaNode #method_name is expected to eq :lambda #receiver is expected to eq nil #arguments is expected to eq 2 RuboCop::AST::ClassNode #identifier is expected to equal true .new is expected to equal true #body with a multi-expression body is expected to equal true with a single expression body is expected to equal true with an empty body is expected to equal nil #parent_class when a parent class is specified is expected to equal true when no parent class is specified is expected to equal nil RuboCop::AST::WhenNode #conditions with a single condition is expected to all be literal is expected to eq 1 with a multiple conditions is expected to all be literal is expected to eq 3 #body with a then keyword is expected to equal true without a then keyword is expected to equal true #then? with a then keyword is expected to be truthy without a then keyword is expected to be falsey .new is expected to equal true #each_condition when not passed a block is expected to equal true when passed a block yields all the conditions #branch_index is expected to eq 2 is expected to eq 1 is expected to eq 0 RuboCop::AST::ReturnNode behaves like wrapped arguments node .new with arguments is expected to equal true without arguments is expected to equal true #arguments with a single argument and braces is expected to eq 1 with no arguments and braces is expected to equal true with a single splat argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with a single argument is expected to eq 1 with no arguments is expected to equal true RuboCop::AST::EnsureNode #body is expected to equal true .new is expected to equal true RuboCop::AST::SelfClassNode .new is expected to equal true #body with a single expression body is expected to equal true with an empty body is expected to equal nil with a multi-expression body is expected to equal true #identifier is expected to equal true RuboCop::AST::NextNode behaves like wrapped arguments node #arguments with a single splat argument is expected to eq 1 with a single argument and braces is expected to eq 1 with no arguments and braces is expected to equal true with a single argument is expected to eq 1 with multiple literal arguments is expected to eq 2 with no arguments is expected to equal true .new without arguments is expected to equal true with arguments is expected to equal true RuboCop::AST::BlockNode .new is expected to equal true #void_context? when block method is each is expected to be truthy when block method is not each is expected to be falsey when block method is tap is expected to be truthy #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 #braces? when enclosed in do-end keywords is expected to be falsey when enclosed in braces is expected to be truthy #opening_delimiter when enclosed in do-end keywords is expected to eq "do" when enclosed in braces is expected to eq "{" #closing_delimiter when enclosed in braces is expected to eq "}" when enclosed in do-end keywords is expected to eq "end" #lambda? when block belongs to a stabby lambda is expected to be truthy when block belongs to a non-lambda method is expected to be falsey when block belongs to a method lambda is expected to be truthy #arguments with a single splat argument is expected to eq 1 with multiple mixed arguments is expected to eq 2 >= Ruby 2.7 using numbered parameters is expected to equal true with a single literal argument is expected to eq 1 with no arguments is expected to equal true #keywords? when enclosed in braces is expected to be falsey when enclosed in do-end keywords is expected to be truthy #delimiters when enclosed in do-end keywords is expected to eq ["do", "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 #arguments? 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 multiple mixed arguments is expected to be truthy with no arguments is expected to be falsey RuboCop::AST::DefNode #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 #last_argument with multiple mixed arguments is expected to equal true with no arguments is expected to equal true with a single regular argument is expected to equal true with multiple regular arguments is expected to equal true with a single rest argument is expected to equal true with a single keyword argument is expected to equal true #body with a multi-expression body is expected to equal true with a single expression body is expected to equal true with no body is expected to equal true #arguments? with multiple mixed arguments is expected to be truthy with a single keyword argument is expected to be truthy with a single regular 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 #predicate_method? with a predicate method is expected to be truthy with a bang method is expected to be falsey with a regular method is expected to be falsey #camel_case_method? with a camel case method is expected to be truthy with a regular method is expected to be falsey when using Ruby 2.7 or newer #argument_forwarding? is expected to be truthy #receiver with a class method definition is expected to equal true with an instance method definition is expected to equal true with a singleton method definition is expected to equal true #void_context? with an initializer method is expected to be truthy with a comparison method is expected to be falsey with a regular method is expected to be falsey with a regular assignment method is expected to be truthy with a bracket assignment method is expected to be truthy #rest_argument? with no arguments is expected to be falsey with a rest argument is expected to be truthy with mixed arguments is expected to be truthy with regular arguments is expected to be falsey #assignment_method? with an assignment method is expected to be truthy with a bracket assignment method is expected to be truthy with a regular method is expected to be falsey with a comparison method is expected to be falsey #comparison_method? with a comparison method is expected to be truthy with a regular method is expected to be falsey #const_receiver? with a singleton method definition is expected to be truthy with an instance method definition is expected to be falsey with a class method definition is expected to be falsey #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 regular arguments is expected to be falsey with a block argument is expected to be truthy with no arguments is expected to be falsey with mixed arguments is expected to be truthy .new with a defs node is expected to equal true with a def node is expected to equal true #first_argument with a single rest 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 regular argument is expected to equal true with no arguments is expected to equal true with multiple regular arguments is expected to equal true #arguments with multiple mixed arguments is expected to eq 2 with no arguments is expected to equal true with argument forwarding is expected to eq 1 with a single rest argument is expected to eq 1 with a single regular argument is expected to eq 1 with multiple regular arguments is expected to eq 2 #method_name with a setter method is expected to eq :foo= with a plain method is expected to eq :foo with a unary method is expected to eq :-@ with an operator method is expected to eq :== #operator_method? 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 with a setter method is expected to be falsey #self_receiver? with a singleton method definition is expected to be falsey with a class method definition is expected to be truthy with an instance method definition is expected to be falsey RuboCop::AST::ResbodyNode .new is expected to equal true #exception_variable for an implicit rescue is expected to eq "ex" for an explicit rescue is expected to eq "ex" when an exception variable is not given is expected to equal nil #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 all be const type is expected to eq 1 #body is expected to equal true #branch_index is expected to eq 1 is expected to eq 0 is expected to eq 2 RuboCop::AST::ConstNode #short_name is expected to eq :BAZ #each_path yields all parts of the namespace #namespace is expected to eq "::Foo::Bar" #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 RuboCop::AST::ForNode .new is expected to equal true #post_condition_loop? is expected to be falsey #keyword is expected to eq "for" #void_context? with a do keyword is expected to be truthy without a do keyword is expected to be truthy #loop_keyword? is expected to be truthy #variable is expected to equal true #body is expected to equal true #collection is expected to equal true #do? with a do keyword is expected to be truthy without a do keyword is expected to be falsey RuboCop::AST::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::StrNode .new with a string with interpolation is expected to equal true with a normal string is expected to equal true with a heredoc is expected to equal true #heredoc? with a heredoc is expected to equal true with a normal string is expected to equal false with a string with interpolation is expected to equal false RuboCop::AST::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 #resbody_branches is expected to eq 2 is expected to all be resbody type #else_branch with an else statement is expected to equal true without an else statement is expected to equal true #body is expected to equal true .new is expected to equal true #else? without an else statement is expected to be falsey with an else 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 RuboCop::AST::ProcessedSource with heavily commented source #line_with_comment? returns true for lines with comments returns false for lines without comments #comment_at_line returns the comment at the given line number returns nil if line has no comment #each_comment yields all comments #comments_before_line returns comments on or before given line #find_comment yields nil when there is no match yields correct comment #contains_comment? provided source_range on comment line is expected to equal true provided a multiline source_range with at least one line with comment is expected to equal true provided source_range on line with comment is expected to equal true provided source_range on line without comment is expected to equal false #each_comment_in_lines yields the comments #blank? with source of no content returns true with source with content returns false #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 #preceding_line returns source of line before token valid_syntax? 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 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 a range is passed returns the array of lines when start index and length are passed returns the array of lines when an index is passed returns the line #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 #last_token_of returns last token for node accepts Node as an argument #lines contains lines as string without linefeed is an array has same number of elements as line count .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 #buffer is a source buffer #tokens_within returns tokens for node accepts Node as an argument when heredoc as argument is present returns tokens for node before heredoc returns tokens for heredoc node returns tokens for node after heredoc #ast is the root node of AST #tokens has an array of tokens #path is the path passed to .new token enumerables #find_token yields nil when there is no match yields correct token #each_token yields all tokens #following_line returns source of line after token #file_path returns file path #first_token_of accepts Node as an argument returns first token for node #comments is an array of comments when the source is invalid returns [] Set#=== tests for inclusion RuboCop::AST::KeywordSplatNode #operator is expected to eq "**" #same_line? when both pairs are on the same line is expected to be truthy when a multiline pair shares the same line is expected to be truthy is expected to be truthy when pairs are on separate lines is expected to be falsey .new is expected to equal true #value_delta when using hash rocket delimiters when keyword splat is behind is expected to eq 0 when keyword splat is left aligned is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when using colon delimiters when keyword splat is behind is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is left aligned is expected to eq 0 #colon? is expected to be falsey #key_delta with alignment set to :right when using hash rocket delimiters when keyword splat is behind is expected to eq 0 when keyword splat is aligned is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 0 when using colon delimiters when keyword splat is behind is expected to eq 0 when keyword splat is ahead is expected to eq 0 when keyword splat is on the same line is expected to eq 0 when keyword splat is aligned is expected to eq 0 with alignment set to :left when using hash rocket delimiters when keyword splat is on the same line is expected to eq 0 when keyword splat is aligned is expected to eq 0 when keyword splat is behind is expected to eq -2 when keyword splat is ahead is expected to eq 2 when using colon delimiters when keyword splat is behind is expected to eq -2 when keyword splat is on the same line is expected to eq 0 when keyword splat is ahead is expected to eq 2 when keyword splat is aligned is expected to eq 0 #value is expected to eq s(:kwsplat, s(:send, nil, :foo)) #key is expected to eq s(:kwsplat, s(:send, nil, :foo)) #hash_rocket? is expected to be falsey RuboCop::AST::CaseNode #else_branch #else? with an else statement is expected to equal true without an else statement is expected to equal true #keyword is expected to eq "case" .new is expected to equal true #when_branches is expected to all be when type is expected to eq 3 #each_when when passed a block yields all the conditions when not passed a block is expected to equal true #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 #else? with an else statement is expected to be truthy without an else statement is expected to be falsey RuboCop::AST::ForwardArgsNode when using Ruby 2.7 or newer #to_a is expected to contain exactly (be forward arg type) Finished in 1.49 seconds (files took 1.38 seconds to load) 1441 examples, 0 failures Randomized with seed 16119 ┌──────────────────────────────────────────────────────────────────────────────┐ │ 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-1yvxzl_y4 I: cleaning package lists and apt cache... I: creating tarball... I: done I: removing tempdir /tmp/mmdebstrap.1J5rHcpv7S... I: success in 2195.9542 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