Diff of the two buildlogs: -- --- b1/build.log 2025-03-04 16:31:43.654893399 +0000 +++ b2/build.log 2025-03-04 16:32:31.472740553 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue Mar 4 04:30:24 -12 2025 -I: pbuilder-time-stamp: 1741105824 +I: Current time: Tue Apr 7 12:54:45 +14 2026 +I: pbuilder-time-stamp: 1775516085 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -30,54 +30,86 @@ dpkg-source: info: applying set-env-home.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/50351/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/D01_modify_environment starting +debug: Running on ionos6-i386. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Apr 6 22:54 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=11 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='i386' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="37" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=21 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='4acbc6b6075847b1a6d8392df0602a74' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='50351' - PS1='# ' - PS2='> ' + INVOCATION_ID=878cb7f602ec4afa92f7f50709754f79 + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=77754 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.wuNuJHdM/pbuilderrc_6vcc --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.wuNuJHdM/b1 --logfile b1/build.log pry_0.14.2-1.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://46.16.76.132:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.wuNuJHdM/pbuilderrc_zXWQ --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.wuNuJHdM/b2 --logfile b2/build.log pry_0.14.2-1.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://213.165.73.152:3128 I: uname -a - Linux ionos12-i386 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/50351/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -262,7 +294,7 @@ Get: 137 http://deb.debian.org/debian unstable/main i386 ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [90.2 kB] Get: 138 http://deb.debian.org/debian unstable/main i386 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 139 http://deb.debian.org/debian unstable/main i386 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] -Fetched 49.4 MB in 1s (71.0 MB/s) +Fetched 49.4 MB in 0s (119 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.13-minimal:i386. (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 ... 19769 files and directories currently installed.) @@ -724,8 +756,8 @@ Setting up tzdata (2025a-2) ... Current default time zone: 'Etc/UTC' -Local time is now: Tue Mar 4 16:31:01 UTC 2025. -Universal Time is now: Tue Mar 4 16:31:01 UTC 2025. +Local time is now: Mon Apr 6 22:55:06 UTC 2026. +Universal Time is now: Mon Apr 6 22:55:06 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up ruby-minitest (5.25.4-2) ... @@ -853,7 +885,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/pry-0.14.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../pry_0.14.2-1_source.changes +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/pry-0.14.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../pry_0.14.2-1_source.changes dpkg-buildpackage: info: source package pry dpkg-buildpackage: info: source version 0.14.2-1 dpkg-buildpackage: info: source distribution unstable @@ -893,12 +929,12 @@ │ pry: Installing files and building extensions for ruby3.3 │ └──────────────────────────────────────────────────────────────────────────────┘ -/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20250304-61923-31p8mm/gemspec +/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20260407-82683-m3jgzg/gemspec Successfully built RubyGem Name: pry Version: 0.14.2 File: pry-0.14.2.gem -/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/pry/usr/share/rubygems-integration/all /tmp/d20250304-61923-31p8mm/pry-0.14.2.gem +/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/pry/usr/share/rubygems-integration/all /tmp/d20260407-82683-m3jgzg/pry-0.14.2.gem /build/reproducible-path/pry-0.14.2/debian/pry/usr/share/rubygems-integration/all/gems/pry-0.14.2/bin/pry /build/reproducible-path/pry-0.14.2/debian/pry/usr/share/rubygems-integration/all/gems/pry-0.14.2/lib/pry.rb /build/reproducible-path/pry-0.14.2/debian/pry/usr/share/rubygems-integration/all/gems/pry-0.14.2/lib/pry/basic_object.rb @@ -1069,65 +1105,125 @@ RUBYLIB=. GEM_PATH=/build/reproducible-path/pry-0.14.2/debian/pry/usr/share/rubygems-integration/all:/build/reproducible-path/pry-0.14.2/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.3.0:/var/lib/gems/3.3.0:/usr/local/lib/ruby/gems/3.3.0:/usr/lib/ruby/gems/3.3.0:/usr/lib/i386-linux-gnu/ruby/gems/3.3.0:/usr/share/rubygems-integration/3.3.0:/usr/share/rubygems-integration/all:/usr/lib/i386-linux-gnu/rubygems-integration/3.3.0 ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation -Randomized with seed 12389 +Randomized with seed 16051 -Pry::CommandState - #state_for - memoizes state for the same command - returns new state for new command - returns a state for the matching command - #reset - resets the command state for the given command - doesn't reset command state for other commands - .default - returns the default command state - when called multiple times - returns the same command state +commands + a command (with :keep_retval => false) that replaces eval_string with a valid expression doesn't have the expression value suppressed + should NOT try to interpolate pure ruby code (no commands) + should run a command with one parameter + should define a command that does NOT keep its return value + creates a command in a nested context and that command should be accessible from the parent + should define a command that keeps its return value but does not return when value is void + should run a command with no parameter + should interpolate ruby code into commands + should create a command with a space in its name and pass an argument + doesn't choke on complex string interpolation when checking if ruby code is a command + should define a command that keeps its return value + should override some inherited commands + should set the commands default, and the default should be overridable + should create a regex command and interpolate the captures + should change description of a command using desc + a command that return a value in a multi-line expression clears the expression and return the value + a command (with :keep_retval => true) that replaces eval_string with a valid expression overwrites the eval_string with the return value + should NOT interpolate ruby code into commands if :interpolate => false + should define a command that keeps its return value even when nil + should create a command with a space in its name zzz + should delete some inherited commands when using delete method + enables an inherited method to access opts, output and target, due to instance_exec + should inherit commands from Pry::Commands + if a regex capture is missing it should be nil + should create a regex command and be able to invoke it + should import commands from another command object + creates a regex command and passes captures into the args list before regular arguments + should create a regex command and arg_string should be interpolated + Pry::Command#run + should run a command from within a command with arguments + should allow running of commands with following whitespace + should allow running of cd command when split into array + should run a regex command from within a command + should run a command from within a command + should allow running of cd command when contained in a single string + Pry#run_command + should run a command in the context of a session + should run a command that modifies the passed in eval_string + alias_command + should pass on arguments to original + should be able to make the alias a regex + should make an aliasd command behave like its original + should be able to alias a regex command + should pass option arguments to original with additional parameters + should pass option arguments to original -hist - should replay a range of history correctly (range of items) - should return first N lines in history with --head switch - should grep for correct lines in history - should disallow execution of `--replay ` when CommandError raised - should store a call with `--replay` flag - excludes Pry commands from the history with `-e` switch - should replay history correctly (single item) - should show lines between offsets A and B with the --show switch - should apply --head after --grep - should show lines between lines A and B with the --show switch - should replay a range of history correctly (range of commands) - should not contain lines produced by `--replay` flag - should return last N lines in history with --tail switch - should apply --tail after --grep - raises CommandError when index of `--replay` points out to another `hist --replay` - should start from beginning if tail number is longer than history - sessions - displays all history (including the current sesion) with `--all` switch - displays history only for current session - should not display histignore words in history +Pry::BlockCommand + #call + when passed a variable-length array + calls the block without arguments + calls the block with some arguments + when #process accepts some arguments + calls the block even if there are more arguments than needed + calls the block even if there's not enough arguments + when #process accepts no arguments + calls the block despite passed arguments + #help + returns help output -Pry::Command::Wtf - #process - when the code flag is present - prints lines of code that exception frame references - and when referenced frame doesn't exist - skips code and prints only the backtrace frame - when captures contains exclamations (wtf?! invocation) - prints more of backtrace - when there wasn't an exception raised - raises Pry::CommandError - when the verbose flag is missing - prints only a part of the exception backtrace - when the verbose flag is present - prints full exception backtrace - when given a nested exception - and when the verbose flag is missing - prints parts of both original and nested exception backtrace - and when the verbose flag present - prints both original and nested exception backtrace +Pry::ExceptionHandler + .handle_exception + when exception is a nested standard error + prints standard error message + when exception is a standard error + prints standard error message + when exception is a UserError and a SyntaxError + prints the syntax error with customized message -Hanami integration - does not enter an infinite loop (#1471, #1621) +Pry::InputCompleter + does not offer methods from restricted modules + ignores methods from modules that override Object#hash incompatibly + should take parenthesis and other characters into account for symbols + should complete instance variables + should complete for arbitrary scopes + should complete for stdlib symbols + should complete for target symbols + completes expressions with all available methods + should not return nil in its output + should complete for target symbols + should complete for arbitrary scopes + should not crash if there's a Module that has a symbolic name. (PENDING: No reason given) + should complete for stdlib symbols + +Pry::Pager + PageTracker + treats a long line as taking up more than one row + records a string with an embedded newline + records short lines that do add up to a page + doesn't count ansi color codes towards length + records short lines that don't add up to a page + doesn't count a line until it ends + +Pry.run_command + can perform a show-source + performs a simple ls + +clear-screen + calls the "cls" command on Windows + calls the "clear" command on non-Windows platforms + +Pry::ControlDHandler + when given eval string is empty & pry instance has 2+ bindings + pops the binding off the stack + saves a dup of the current binding stack in the 'cd' command + when given eval string is non-empty + clears input buffer + when given eval string is empty & pry instance has one binding + throws :breakout + clears binding stack + +reload_code + reload_current_file + raises an error when pry command not found + reloads pry commmand + raises an error source code not found + raises an error when class not found Pry::Command::Cat::FileFormatter #file_and_line @@ -1137,848 +1233,1084 @@ parses absolute path with line_num parses absolute path without line_num windows filesystem - parses '/'style absolute path without line_num - parses '\'style absolute path with line_num - parses '\'style absolute path without line_num parses '/'style absolute path with line_num + parses '\'style absolute path without line_num + parses '\'style absolute path with line_num + parses '/'style absolute path without line_num #format - formats given files formats given files with line number + formats given files -cd - cds into an object and its ivar and back again using cd obj/@ivar/.. syntax - should break out to outer-most session with cd / - should cd into complex input (with spaces) - should cd into previous object and its local using cd ../local syntax - can cd into an expression containing a string with slashes in it - can cd into objects that redefine #respond_to? to return true - should cd back to top-level and then into another ivar using cd /@ivar/ syntax - should start a session on TOPLEVEL_BINDING with cd :: - should break out to outer-most session with just cd (no args) - cds into an object and its ivar using cd obj/@ivar/ syntax (note following /) - should not cd into complex input when it encounters an exception - cds into an object and its ivar and back and then into another ivar using cd obj/@ivar/../@y syntax - should not leave the REPL session when given 'cd ..' - can cd into an expression with division in it - should cd into simple input - should cd into an object and its ivar using cd obj/@ivar syntax - should break out of session with cd .. - should be able to cd into the Object BasicObject - old stack toggling with `cd -` - when using simple cd syntax - should toggle - when using cd / - should toggle - when using cd .. - should toggle with a simple path - should toggle with a complex path - series of cd calls - should toggle with fuzzy `cd -` calls - in fresh pry instance - should not toggle when there is no old stack - when using ^D (Control-D) key press - should keep correct old binding - when using cd :: - should toggle - when an error was raised - should not toggle and should keep correct stacks - when using complex cd syntax - should toggle with a complex path (simple case) - should toggle with a complex path (more complex case) - -amend-line - should amend the specified line of input when line number given - should correctly delete a specific line using the ! for content - should amend the first line of input when 0 given as line number - should display error if nothing to amend - should ignore second value of range with > syntax - should amend a range of lines of input when negative numbers given - should correctly amend the specified line with interpolated text - should amend the last line of input when no line number specified - should amend a specified line when negative number given - should correctly delete a range of lines using the ! for content - should correctly delete the previous line using the ! for content - should correctly insert a line before a specified line using > - should amend the specified range of lines, with numbers < 0 in range - should correctly amend the specified range of lines +Pry + should display correct number of errors on invalid syntax like ["o = Object.new.tap{ def o.render;", "'MEH'", "}"] + should raise an error on invalid syntax like ["puts {key: 'val'}.to_json"] + should not intefere with syntax errors explicitly raised + should allow whitespace delimeted strings ending on the first char of a line + should raise an error on invalid syntax like ["puts :"] + should not suppress the error output if the line ends in ; + should display correct number of errors on invalid syntax like ["def", "method(1"] + should allow newline delimeted strings + should not raise an error on broken lines: p = '\n' + should raise an error on invalid syntax like ["1 1"] + should display correct number of errors on invalid syntax like ["end"] + should display correct number of errors on invalid syntax like ["1 1"] + should raise an error on invalid syntax like ["puts )("] + should allow trailing , to continue the line + should not raise an error on broken lines: abc =~ /hello\n/ + should not clobber _ex_ on a SyntaxError in the repl + should not raise an error on broken lines: pouts(< + should correctly delete a range of lines using the ! for content + should amend a specified line when negative number given + should amend the specified range of lines, with numbers < 0 in range + should display error if nothing to amend + should correctly amend the specified range of lines + should ignore second value of range with > syntax + should correctly delete the previous line using the ! for content + should amend the first line of input when 0 given as line number + should amend the specified line of input when line number given + should amend the last line of input when no line number specified -Pry - should display correct number of errors on invalid syntax like ["end"] - should not raise an error on broken lines: p = < false) that replaces eval_string with a valid expression doesn't have the expression value suppressed - enables an inherited method to access opts, output and target, due to instance_exec - should create a command with a space in its name and pass an argument - should NOT try to interpolate pure ruby code (no commands) - a command (with :keep_retval => true) that replaces eval_string with a valid expression overwrites the eval_string with the return value - should create a command with a space in its name zzz - creates a command in a nested context and that command should be accessible from the parent - should inherit commands from Pry::Commands - should create a regex command and interpolate the captures - should NOT interpolate ruby code into commands if :interpolate => false - should delete some inherited commands when using delete method - should create a regex command and be able to invoke it - should run a command with one parameter - should define a command that keeps its return value even when nil - if a regex capture is missing it should be nil - should define a command that keeps its return value - should define a command that keeps its return value but does not return when value is void - doesn't choke on complex string interpolation when checking if ruby code is a command - should change description of a command using desc - should import commands from another command object - creates a regex command and passes captures into the args list before regular arguments - should create a regex command and arg_string should be interpolated - should override some inherited commands - Pry::Command#run - should allow running of cd command when contained in a single string - should run a regex command from within a command - should allow running of cd command when split into array - should run a command from within a command - should run a command from within a command with arguments - should allow running of commands with following whitespace - Pry#run_command - should run a command in the context of a session - should run a command that modifies the passed in eval_string - alias_command - should pass option arguments to original - should pass option arguments to original with additional parameters - should make an aliasd command behave like its original - should be able to make the alias a regex - should be able to alias a regex command - should pass on arguments to original - -test Pry defaults - should set the print default, and the default should be overridable - should set the hooks default, and the default should be overridable - should set the output default, and the default should be overridable - view_clip used for displaying an object in a truncated format - given an object with an #inspect string as long as the maximum specified - returns the #<> format of the object (never use inspect) - given a regular object with an #inspect string longer than the maximum specified - when the object is a Class or a Module - with a #name longer than the maximum specified - returns a string of the # format - without a name (usually a c = Class.new) - returns a string of the # format - with a #name shorter than or equal to the maximum specified - returns a string of the # format - when the object is a regular one - returns a string of the # format - the list of prompt safe objects - returns the #inspect of the special-cased immediate object: test - returns #<> format of the special-cased immediate object if #inspect is longer than maximum - returns the #inspect of the special-cased immediate object: -5 - returns the #inspect of the special-cased immediate object: 1 - returns the #inspect of the special-cased immediate object: 2.0 - returns the #inspect of the custom prompt safe objects - returns the #inspect of the special-cased immediate object: hello - given an object with an #inspect string - returns the #<> format of the object (never use inspect) - given the 'main' object - returns the #to_s of main (special case) - quiet - should hide whereami if quiet is set - should show whereami by default - toplevel_binding - should have self the same as TOPLEVEL_BINDING - should be devoid of local variables - should define private methods on Object - prompts - sets the prompt default, and the default should be overridable (single prompt) - sets the prompt default, and the default should be overridable (multi prompt) - storing and restoring the prompt - should not pop the last prompt - should restore overridden prompts when returning from shell-mode - #pop_prompt should return the popped prompt - should have a prompt stack - #prompt= should replace the current prompt with the new prompt - when several prompts on the stack - when only one prompt on the stack - pry return values - should return the parameter (function call) given to exit-all - should return the parameter given to exit-all - should return the parameter (self) given to exit-all - should return the parameter (multi word string) given to exit-all - should return nil - input - should not pass in the prompt if the arity is 0 - should set the input default, and the default should be overridable - should not pass in the prompt if the arity is -1 - should pass in the prompt if readline arity is 1 -Pry::ColorPrinter - .pp - when an exception is raised in #inspect - still prints a string - when printing a BasicObject - prints a string - when #inspect returns an object literal - prints the object inspect - and when SyntaxHighlighter returns a token that doesn't start with '' - prints the object with escape characters - and when SyntaxHighlighter returns a token starting with '' - prints the object as is - when no exception is raised in #inspect - prints a string with a newline - when #inspect raises Pry::Pager::StopPaging - propagates the error - .default - prints output prefix with value +show-doc + emits a deprecation warning + shows docs -Pry::Helpers::DocumentationHelpers - process_rdoc - should emphasise em tags - should not remove ++ - should syntax highlight code in - should not double-highlight backticks inside indented code - should emphasise italic tags - should not syntax highlight already highlighted code - should syntax highlight things in backticks - should syntax highlight code in - should highlight words surrounded by +s - should syntax highlight indented code - get_comment_content - should strip out leading lines of hashes - should strip off the hash and unindent - should unindent past separators - should remove shebangs +play + playing a file + should output file contents with print option + should play a file + whatever + should properly reindent lines + should APPEND to the input buffer when playing a method line, not replace it + should play a method (multiple lines) + should play documentation with the -d switch + has pretty error messages when -d cant find object + should restrict -d switch with --lines + should play a method (a single line) + play -e + should run an expression from given line number + play -i + should play multi-ranged input expressions -Pry::Prompt - #description - returns description - .add - returns nil - adds a new prompt - raises error on adding a prompt with the same name - raises error when separators.size != 2 - .all - returns a hash with prompts - returns a duplicate of original prompts - #prompt_procs - returns the proc array - prompt invocation - computes prompt name dynamically - #incomplete_proc - returns the second proc - .[] - accesses prompts - #wait_proc - returns the first proc - #name - returns name +Pry::Helpers::Text + #strip_color + removes color code from text "string" + removes color code from text "\e[31m\e[1;31m'\e[0m\e[31mhello\e[1;31m'\e[0m\e[31m\e[0m\e[1B\e[0G" + removes color code from text "\e[1A\e[0G[2] pry(main)> puts \e[31m\e[1;31m'\e[0m\e[31mhello\e[1;31m'\e[0m\e[31m\e[0m\e[1B\e[0G" -edit - pretty error messages - should display a nice error message when cannot open a file - with --in - should not work with nonsense - should edit the nth line of _in_ - should edit a range of lines if a range is given - should not work with a filename - should edit a multi-line expression as it occupies one line of _in_ - should edit the last line if no argument is given - with FILE - should use the line number from -l - should work with require relative - should not allow patching any known kind of file - should guess the line number from a colon - should invoke Pry.config.editor with absolutified filenames - should not delete the file! - works with files that contain blanks in their names - - should reload the file if it is a ruby file - should not reload a ruby file if -n is given - should not reload the file if it is not a ruby file - should reload a non-ruby file if -r is given - - should pass the editor a reloading arg - old edit-method tests now migrated to edit - on a method defined in a file - with three-arg editor - should pass the editor a reloading arg - with -p - should successfully replace a method from a module - should successfully replace an instance method - should preserve module nesting - should successfully replace a class method - should successfully replace a method with a question mark - should successfully replace a method on an instance - monkey-patching - should work for an instance method - should work with nesting - should work for a method with a question mark - should work for a method from a module - should work for a method on an instance - should work for a class method - without -p - should correctly find a class method - should correctly find a method from a module - should correctly find an aliased method - should correctly find an instance method - should correctly find a method on an instance - on an aliased method - should change the alias, but not the original, without breaking super - without FILE - should use a blank file if -t is specified - should edit the current expression if it's incomplete - should ignore -n for tempfiles - should edit the previous expression if the current is empty - should position the cursor at the end of the expression - should write the evaluated command to history - should evaluate the expression - should not evaluate a file with -n - should use a blank file if -t given, even during an expression - --method flag - errors when cannot find method context - errors when a filename arg is passed with --method - should edit method context - with --ex - with a real file - edits the exception even when in a patched method context - should reload the file - should not reload the file if -n is passed - with --patch - should apply changes only in memory (monkey patching) - with --ex NUM - should start editor on first level of backtrace with --ex 0 - should start editor on third level of backtrace with --ex 2 - should start on first level of backtrace with just --ex - should start editor on second level of backtrace with --ex 1 - should display error message when backtrace level is invalid - when editing a method by name - can repeatedly edit methods that were defined in the console - uses patch editing on methods that were previously patched +Hanami integration + does not enter an infinite loop (#1471, #1621) Pry::History + #history_line_count + counts entries in history + file io errors + handles Errno::ENOENT failure to write history + handles Errno::ENOENT failure to read from history + handles Errno::EACCES failure to read from history + handles Errno::EACCES failure to write history + #push + does not record duplicated lines + does not record lines that contain a NULL byte + does not record empty lines + #clear + clears this session's history + doesn't affect the contents of the history file + saving to a file + should not write histignore words to the history file + interleaves lines from many places + saves lines to a file as they are written .default_file returns ~/.local/share/pry/pry_history when $XDG_DATA_HOME is defined @@ -1986,152 +2318,245 @@ returns config location relative to $XDG_DATA_HOME when ~/.pryrc exists when ~/.pry_history exists returns ~/.pry_history - saving to a file - saves lines to a file as they are written - interleaves lines from many places - should not write histignore words to the history file + #session_line_count + returns the number of lines in history from just this session .load_history reads the contents of the file - #history_line_count - counts entries in history expanding the history file path recognizes ~ (#1262) - #session_line_count - returns the number of lines in history from just this session - #push - does not record lines that contain a NULL byte - does not record empty lines - does not record duplicated lines - #clear - clears this session's history - doesn't affect the contents of the history file - file io errors - handles Errno::EACCES failure to read from history - handles Errno::ENOENT failure to write history - handles Errno::EACCES failure to write history - handles Errno::ENOENT failure to read from history -whereami - should work inside a class - should work inside an object - should show entire file when -f option used - should work in objects with no method methods - should work with prepended methods - should not show line numbers or marker when -n switch is used - shows description and corrects code when @method.source_location would raise an error - uses Pry.config.default_window_size for window size when outside a method context - should work in BasicObjects - should show entire method when -m option used - should properly set _file_, _line_ and _dir_ - shows description and corrects code when __LINE__ and __FILE__ are outside @method.source_location - should work with methods that have been undefined - should work at the top level - should show code window (not just method source) if parameter passed to whereami - -c - should show class when -c option used, and beginning of the class is on thesame line as another expression - should show class when -c option used, and binding is outside a method - should show class when -c option used, and locate correct candidate - should show class when -c option used, and locate correct superclass +Pry::Command::ShellCommand + cd + .cd + saves the current working directory + given an empty string + sends ~ to File.expand_path + with CDPATH + when it is defined + simple cdpath + cd's into the dir + complex cdpath + cd's into the dir + given a path + sends the path to File.expand_path + given a dash + given no prior directory + raises the correct error + given a prior directory + sends the user's last pry working directory to File.expand_path -Pry::Helpers::CommandHelpers - #absolute_index_range - when given an integer - returns an absolute range that was decremented - when given an integer - returns a range based on the integer and array length - #restrict_to_lines - when lines are specified as an integer - restricts the given string to the specified line number - when lines are specified as a range - restricts the given string to the specified range - #temp_file - unlinks the tempfile - creates a tempfile with rb extension - closes the tempfile - yields a tempfile - allows overwriting file extension - #get_method_or_raise - when there's name but no corresponding method - raises MethodNotFound - when super opt is provided and there's a parent method - gets the parent method - when there's no method name - raises MethodNotFound - when super opt is provided but there's no super method - raises MethodNotFound - #internal_binding? - when target's __method__ returns nil - returns true - when target's __method__ returns __pry__ - returns true - when target's __method__ returns __binding__ - returns true - #one_index_number - when line number is more than 0 - decrements the line number - when line number is 0 - returns the line number - #one_index_range_or_number - when given an integer - decrements the line number - when given a range - decrements range boundaries - #unindent - should ignore lines starting with -- - should only remove a common prefix - should not be phased by empty lines - should also remove tabs if present - removes the same prefix from all lines - #set_file_and_dir_locals - sets pry instance's last_dir to _dir_ - injects local variable _file_ - sets pry instance's last_file to _file_ - injects local variable _dir_ - #one_index_range - decrements range boundaries - #absolute_index_number - when line number is zero - returns the line number - when line number is less than zero - returns the absolute sum of line number and array length +Pry::Config + is expected to be a kind of String + is expected to be a kind of Pry::Hooks + is expected to be a kind of Numeric + is expected to be a kind of String + is expected to eq Pry::InputCompleter + is expected to be a kind of Method + is expected to respond to #readline + is expected to eq true or equal false + is expected to respond to #call + is expected to be a kind of Hash + is expected to equal true or equal false + is expected to equal true or equal false + is expected to equal true or equal false + is expected to be a kind of String + is expected to be a kind of Pry::CommandSet + is expected to equal true or equal false + is expected to equal true or equal false + is expected to eq true or equal false + is expected to be a kind of Proc + is expected to be a kind of String + is expected to equal true or equal false + is expected to equal true or equal false + is expected to be a kind of String + is expected to be a kind of Array + is expected to equal true or equal false + is expected to be a kind of Pry::History + is expected to equal true or equal false + is expected to equal true or equal false + is expected to be a kind of OpenStruct + is expected to equal true or equal false + is expected to be a kind of Numeric + is expected to be a kind of IO + is expected to be a kind of Array + is expected to equal true or equal false + is expected to be a kind of Array + is expected to be a kind of Pry::Prompt + is expected to be a kind of String + is expected to be a kind of String or equal nil + is expected to be a kind of Method + is expected to be a kind of Method + is expected to be a kind of Proc + #rc_file + when $XDG_CONFIG_HOME is defined + and when '/xdg_home/pry/pryrc' exists + defaults to $XDG_CONFIG_HOME/pry/pryrc + and when ~/.pryrc exists + defaults to ~/.pryrc + and when ~/.config/pry/pryrc exists + defaults to ~/.config/pry/pryrc + and when no default rc file exists + should return nil + when ~/.pryrc exists and $XDG_CONFIG_HOME is undefined + defaults to ~/.pryrc + when $PRYRC env variable is set + defaults to the value of PRYRC env variable + #control_d_handler + when it returns a callabale with two arguments + and when it's called with multiple arguments + calls the handler with a eval_string and a pry instance + and when it's called with one argument + calls the handler with a eval_string and a pry instance + when it returns a callable accepting one argument + and when it is called with one argument + calls the handler with a pry instance + and when it is called with multiple arguments + calls the handler with a pry instance + #method_missing + when invoked method ends with = + assigns a new custom option + when invoked method is not an option + returns nil + when invoked method is a LazyValue + defines a callable attribute + #control_d_handler= + when the handler expects just one argument + doesn't print a warning + when the handler expects multiple arguments + prints a warning + #[] + returns the config value + reads the config value + #merge + returns a new config object + doesn't mutate the original config + #merge! + merges given hash with the config instance + returns self + when an undefined option is given + adds the option to the config + #respond_to? + when checking an undefined option + returns false + when checking a defined option + returns true for the reader + returns true for the writer -Pry::Warning - #warn - prints message with file and line of the calling frame +Pry::Command::Wtf + #process + when the verbose flag is missing + prints only a part of the exception backtrace + when there wasn't an exception raised + raises Pry::CommandError + when captures contains exclamations (wtf?! invocation) + prints more of backtrace + when the verbose flag is present + prints full exception backtrace + when the code flag is present + prints lines of code that exception frame references + and when referenced frame doesn't exist + skips code and prints only the backtrace frame + when given a nested exception + and when the verbose flag is missing + prints parts of both original and nested exception backtrace + and when the verbose flag present + prints both original and nested exception backtrace -cat - with --in -1 - should display the last expression with no index - when invoked without arguments - should display an error message - on receiving a file that does not exist - should display an error message - with --ex - cat --ex should correctly display code that generated exception - cat --ex should display repl code that generated exception - with --in - should display the last few expressions with indices - with --in 1..2 - should display the given range with indices, omitting nils - with --in 1 - should display the first expression with no index - with --ex N - should show error when backtrace level out of bounds - should cat third level of backtrace when --ex 2 used - should cat second level of backtrace when --ex 1 used - should cat first level of backtrace when --ex used with no argument - should cat first level of backtrace when --ex 0 used - each successive cat --ex should show the next level of backtrace, and going past the final level should return to the first +Pry::ClassCommand + .source + returns source code for the process method + #process + raises CommandError + .source_file + returns source file + #help + returns help output + .source_line + returns source file + .doc + returns source code for the process method + .inherited + when description is defined + sets description on the subclass + when match is defined + sets match on the subclass + when command_options is defined + sets command_options on the subclass + #slop + defines the help option + returns a Slop instance + makes Slop's banner unindented + when there are subcommands + adds subcommands to Slop + when there are options + adds subcommands to Slop + #complete + generates option completions + #call + sets command's args + sets command's opts + invokes setup + when help is invoked + outputs help info + returns void value + when help is not invloved + when #process accepts no arguments + calls the command despite passed arguments + when passed a variable-length array + calls the command with some arguments + calls the command without arguments + when #process accepts some arguments + calls the command even if there's not enough arguments + calls the command even if there are more arguments than needed + .source_location + returns source location ! should correctly clear the input buffer should not clear the input buffer for negation -show-input - should correctly show the current lines in the input buffer +Pry::Prompt + #description + returns description + .all + returns a hash with prompts + returns a duplicate of original prompts + .[] + accesses prompts + .add + returns nil + raises error when separators.size != 2 + raises error on adding a prompt with the same name + adds a new prompt + #prompt_procs + returns the proc array + #wait_proc + returns the first proc + prompt invocation + computes prompt name dynamically + #name + returns name + #incomplete_proc + returns the second proc -pry_backtrace - should print a backtrace +Pry::Editor + build_editor_invocation_string + should shell-escape files + build_editor_invocation_string on windows + should not shell-escape files + .default + when no editor is detected + shells out to find 'vi' + shells out to find 'editor' + shells out to find 'nano' + when $EDITOR is defined + returns the value of $EDITOR + when $VISUAL is defined + returns the value of $VISUAL + when platform is Windows + returns 'notepad' + invoke_editor with a proc + should not shell-escape files Pry::SystemCommandHandler .default @@ -2140,1248 +2565,859 @@ when doesn't exist executes the command without printing the warning -watch expression - prints no watched expressions - watches a local variable - watches an expression - registers the after_eval hook - doesn't print when an expresison remains the same - prints when an expression is mutated - prints when an expression changes - continues to work if you start a second pry instance - deleting expressions - keeps keeper - deletes delete - -Pry::Command::ShellCommand - cd - .cd - saves the current working directory - with CDPATH - when it is defined - simple cdpath - cd's into the dir - complex cdpath - cd's into the dir - given an empty string - sends ~ to File.expand_path - given a path - sends the path to File.expand_path - given a dash - given a prior directory - sends the user's last pry working directory to File.expand_path - given no prior directory - raises the correct error +show-input + should correctly show the current lines in the input buffer -Pry::Helpers::Text - #strip_color - removes color code from text "string" - removes color code from text "\e[31m\e[1;31m'\e[0m\e[31mhello\e[1;31m'\e[0m\e[31m\e[0m\e[1B\e[0G" - removes color code from text "\e[1A\e[0G[2] pry(main)> puts \e[31m\e[1;31m'\e[0m\e[31mhello\e[1;31m'\e[0m\e[31m\e[0m\e[1B\e[0G" +hist + should apply --tail after --grep + should show lines between lines A and B with the --show switch + excludes Pry commands from the history with `-e` switch + should show lines between offsets A and B with the --show switch + should replay history correctly (single item) + should replay a range of history correctly (range of commands) + should return last N lines in history with --tail switch + should disallow execution of `--replay ` when CommandError raised + raises CommandError when index of `--replay` points out to another `hist --replay` + should grep for correct lines in history + should store a call with `--replay` flag + should not contain lines produced by `--replay` flag + should return first N lines in history with --head switch + should replay a range of history correctly (range of items) + should start from beginning if tail number is longer than history + should apply --head after --grep + sessions + should not display histignore words in history + displays all history (including the current sesion) with `--all` switch + displays history only for current session ls - with -l - should find locals and sort by descending size - should not list pry noise - below ceiling - should not include super-classes when -q is given - should include super-classes by default - should stop before Object by default - should include object if -v is given - BasicObject - should work on BasicObject - should work on subclasses of BasicObject - grep - should still output matching things - should reduce the number of outputted things on java objects - should include java-esque aliases if requested (PENDING: No reason given) should omit java-esque aliases by default (PENDING: No reason given) - help - should show help with -h - immediates - should work on Integer - bug #1407 - behaves as usual when a method of the same name exists. + should include java-esque aliases if requested (PENDING: No reason given) constants - should not show constants defined on parent modules by default should show constants defined on ancestors with -v - should show constants for an object's class regardless of mixins should not autoload constants! works on top-level + should not show constants defined on parent modules by default should show constants defined on the current module + should show constants for an object's class regardless of mixins + BasicObject + should work on subclasses of BasicObject + should work on BasicObject + immediates + should work on Integer + grep + should still output matching things + should reduce the number of outputted things + with -l + should find locals and sort by descending size + should not list pry noise + help + should show help with -h when inside Modules - should work for ivars + should still work should behave normally when invoked on Module itself + should work for ivars should include instance methods by default - should still work when no arguments given - when in a class + when in an object should show methods + should show instance variables + when in a class should show constants should show class variables - when in an object should show methods - should show instance variables when at the top-level should show local variables + bug #1407 + behaves as usual when a method of the same name exists. methods - should show public methods with -p should show error message when instance is given with -M option - should work for objects with an overridden method method should show public methods by default - should work for objects which instance_variables returns array of symbol but there is no Symbol#downcase - should not show protected/private by default should handle classes that (pathologically) define .ancestors + should work for objects which instance_variables returns array of symbol but there is no Symbol#downcase + should work for objects with an overridden method method + should show public methods with -p should show protected/private methods with -p + should not show protected/private by default + below ceiling + should include super-classes by default + should not include super-classes when -q is given + should stop before Object by default + should include object if -v is given -Pry - output_prefix - should be able to change output_prefix - output suppression - should output something if the input ends with a comment - should not output something if the input is only a comment - should normally output the result - should not output anything if the input ends with a semicolon - custom non-IO object as $stdout - does not crash pry - output failsafe - should catch errors serializing exceptions - should catch serialization exceptions - should display serialization exceptions - default print - doesn't leak colour for object literals - should include the => - should not be phased by un-inspectable things - should output the right thing - color - should colorize strings as though they were ruby - should not colorize strings that already include color - -Pry - DISABLE_PRY - should not Pry.start - should not binding.pry - FAIL_PRY - should raise an error for Pry.start - should raise an error for binding.pry - Exotic object support - Should not error when return value is a BasicObject instance - Pry.critical_section - should prevent Pry being called - #last_exception= - returns a frozen exception - returns an object who mirrors itself as the wrapped exception - returns an instance of Pry::LastException - .configure - yields a block with Pry.config as its argument - setting custom options - correctly handles the :quiet option (#1261) - does not raise for unrecognized options - Pry.binding_for - Should not error when object doesn't have a valid == method - should not leak local variables - should work on frozen objects - open a Pry session on an object - repl - basic functionality - should set an ivar on an object and exit the repl - Pry.binding_for - should return TOPLEVEL_BINDING if parameter self is main - Object#pry - should start a pry session on the receiver (second form) - should start a pry session on the receiver (first form) - should raise if more than two arguments are passed to Object#pry - nesting - should nest properly - defining methods - defines an instance method on the module when performing "def meth;end" inside the module - defines an instance method on the class when performing "def meth;end" inside the class - defines a method on the class of an object when performing "def meth;end" inside an immediate value or Numeric - defines a method on the singleton class of an object when performing "def meth;end" inside the object - history arrays - can change the size of the history arrays - uses 100 as the size of _in_ and _out_ - sets _ to the last result - sets out to an array with the result - sets _in_ to an array with the entered lines - store exceptions - last_result - should be set to the result of a command with :keep_retval - should be preserved when evalling a command without :keep_retval - should be preserved over an empty line - should be set to the most recent value - complete_expression? - should not mutate the input! - rep - should notice when exceptions are raised - should suppress output if input ends in a ";" (single line) - should suppress output if input ends in a ";" and is an Exception object (single line) - should not try to catch intended exceptions - should be able to operate inside the BasicObject class - should make self evaluate to the receiver of the rep session - should not leak pry constants into Object namespace - should display error if Pry instance runs out of input - should set an ivar on an object - should define a nested class under Hello and not on top-level or Pry - should be able to evaluate exceptions normally - inside signal handler - should return with error message - multi-line input - works - should suppress output if input ends in a ";" (multi-line) - newline stripping from an empty regexp - with regular regexp delimiters - with fancy delimiters - newline stripping from an empty string - with fancy delimiters - with single quotes - with double quotes - newline from an empty heredoc - works - a fresh instance - should use `caller` as its backtrace - -Pry::CommandSet - #[]= - rebinds the command with key - when given command is not a subclass of Pry::Command - raises TypeError - when given command is nil - deletes the command matching the pattern - #rename_command - renames a comamnd - can optionally set custom description - when provided command is not registered - raises ArgumentError - #list_commands - returns the list of commands - #import - returns self - imports commands from given sets - includes given sets' helper modules - #find_command_by_match_or_listing - raises ArgumentError on non-matching command - returns a matching by name command - returns a matching by listing command - #block_command - can overwrite default description - defines a new command - configures command options - assings default description - when description is a hash - treats description as options - #add_command - adds a command - #alias_command - sets aliased command's listing for string alias - sets aliased command's listing for regex alias - returns the aliased command - sets group for the aliased command automatically - sets description for the aliased command automatically - when command doesn't match - raises RuntimeError - when string description is provided - uses the given description for the aliased command - when non-string description is provided - uses the string representation of the given object - #delete - deletes given commands - #valid_command? - when command can be found - returns true - when command cannot be found - returns false - #to_hash - converts commands to hash - doesn't mutate original commands - #each - iterates over commands - #[] - when there's an ambiguous command - prefers a command with a higher score - when there's an unambiguous command - selects the command according to the given pattern - #new - merges other set with itself - when block given - instance evals the block - #create_command - can overwrite default description - defines a new class command - configures command options - class_evals the given block in the command context - assings default description - when description is a hash - treats description as options - #desc - gets command description - sets command description - #find_command_for_help - when the command can be found - returns the command - when the command cannot be found - returns nil - #process_line - when the given line is a command - returns a non-void command - returns a command - and context is provided - passes the context to the command - when the given line is not a command - returns a void result - returns not a command - #import_from - imports matching command from a set - includes other set's helper module - returns self - -show-doc - emits a deprecation warning - shows docs - -Pry::Env - #[] - when ENV contains the passed key but its value is nil - is expected to be nil - when ENV doesn't contain the passed key - is expected to be nil - when ENV contains the passed key - is expected to eq "val" - -Pry::Config::LazyValue - #call - doesn't memoize the result of call - -Pry::ExceptionHandler - .handle_exception - when exception is a nested standard error - prints standard error message - when exception is a UserError and a SyntaxError - prints the syntax error with customized message - when exception is a standard error - prints standard error message - -Pry::Config::MemoizedValue - #call - doesn't conflate falsiness with unmemoizedness - memoizes the result of call - -save-file - -f - should save a file to a file - -i - should display a success message on save - should save multi-ranged input expressions - should save input expressions to a file (single expression) - should save input expressions to a file (range) - saving methods - single method - should save a method to a file truncated by --lines - should save a method to a file - should display a success message on save - --append - should append to end of specified file - overwrite by default (no --append) - should overwrite specified file with new input - saving commands - should save a command to a file - -Pry::REPL - should let you run commands in the middle of multiline expressions - should rescue exceptions - autoindent - should raise no exception when indented with a tab (PENDING: Temporarily skipped with xit) - eval_string and binding_stack - shouldn't break if we start a nested instance - shouldn't break if we pop bindings in Ruby - should immediately evaluate eval_string after cmd if complete - shouldn't break if we start a nested REPL - #piping? - returns false when $stdout is a non-IO object - space prefix - with more than 1 space - prioritizes commands over variables - with 1 space - it prioritizes variables over commands - -Pry::Method::Patcher - should return a new method with new source - should change the source of new Pry::Method objects - should preserve visibility - should change the behaviour of the method - -exit-program - should raise SystemExit - should exit the program with the provided value +find-method + should work with badly behaved constants + should escape regexes correctly + find matching methods by name regex (-n option) + should NOT match a method that does not match the regex + should find a method by regex + find matching methods by content regex (-c option) + should NOT match a method that does not match the regex + should find a method by regex -exit - should break out of the repl and return user-given value - should pop a binding - should break out of the repl even after an exception - should break out of the repl when binding_stack has only one binding +whereami + should properly set _file_, _line_ and _dir_ + should work inside an object + should not show line numbers or marker when -n switch is used + should show entire file when -f option used + should work in objects with no method methods + should work with prepended methods + shows description and corrects code when __LINE__ and __FILE__ are outside @method.source_location + should work at the top level + should show entire method when -m option used + should work inside a class + should work with methods that have been undefined + shows description and corrects code when @method.source_location would raise an error + should work in BasicObjects + should show code window (not just method source) if parameter passed to whereami + uses Pry.config.default_window_size for window size when outside a method context + -c + should show class when -c option used, and beginning of the class is on thesame line as another expression + should show class when -c option used, and locate correct superclass + should show class when -c option used, and binding is outside a method + should show class when -c option used, and locate correct candidate Pry::CodeObject .lookup - when looking up anonymous class methods - finds instance methods via the # notation + when looking up empty string while being inside a module + infers the module + when looking up 'nil' + returns nil + when looking up classes with 'super: 1' + finds the parent class + when looking up classes with 'super: 0' + finds the child class when looking up class methods of a named class finds instance methods via the # notation - when looking up Pry commands by class + when looking up method + finds methods defined on objects + when looking up Pry::BlockCommand + finds Pry:BlockCommand + when looking up Pry commands by listing finds Pry::WrappedModule when looking up classes finds classes - when looking up classes with 'super: 0' - finds the child class - when looking up empty string while being inside a module - infers the module - when looking up method - finds methods defined on objects - when looking up classes by names of variables - finds instance methods via the # notation - when looking up empty string while being inside a class instance - infers the module when looking up 'nil' while being inside a module infers the module - when looking up procs - finds classes - when looking up empty string while being inside a method - infers the method when looking up modules finds modules - when looking up 'nil' while being inside a method + when looking up empty string while being inside a method infers the method - when looking up 'nil' - returns nil - when looking up Pry commands by listing + when looking up instance methods + finds instance methods via the # notation + finds instance methods via the . notation + when looking up Pry commands by class finds Pry::WrappedModule - when looking up commands with the super option - finds the command ignoring the super option + when looking up 'nil' while being inside a class instance + infers the module + when looking up empty string while being inside a class instance + infers the module + when looking up instance methods of a class + finds instance methods when looking up Pry::ClassCommand finds Pry:BlockCommand - when looking up classes with 'super: 1' - finds the parent class + when looking up 'nil' while being inside a method + infers the method + when looking up anonymous class methods + finds instance methods via the # notation + when looking up classes by names of variables + finds instance methods via the # notation + when looking up commands with the super option + finds the command ignoring the super option + when looking up procs + finds classes when there is a class and a method who is a namesake + finds the class before the method finds the method when the look up ends with () finds the class before the method when it's namespaced - finds the class before the method - when looking up Pry::BlockCommand - finds Pry:BlockCommand - when looking up instance methods - finds instance methods via the # notation - finds instance methods via the . notation - when looking up instance methods of a class - finds instance methods - when looking up 'nil' while being inside a class instance - infers the module -Pry::Command - .block - when block doesn't exist - uses #process method - when block exists - returns the block - .doc - returns help output - .inspect - returns command name - .banner - when given an argument - merges the argument with command options - when no argument is given - and when banner was not defined previously - return nil - and when banner was defined previously - returns the memoized banner - .subclass - returns a new class - sets command options on the new class - includes helpers to the new class - sets block on the new class - sets match on the new class - sets description on the new class - #target_self - returns the value of self inside the target binding - #tokenize - when command regex has captures - returns the captures - when given string doesn't match a command - raises CommandError - when given string uses interpolation - interpolates the string in the target's context - and when interpolation is disabled - doesn't interpolate the string - when shellwords is disabled - doesn't split quotes from the arguments - when target is not set - still returns tokens - when shellwords is enabled - strips quotes from the arguments - .default_options - when given a String argument - returns default options with string listing - when given an Object argument - returns default options with object's inspect as listing - #state - remembers the state - returns a state object - .matches? - when given value doesn't match command regex +cd + should break out to outer-most session with just cd (no args) + should cd back to top-level and then into another ivar using cd /@ivar/ syntax + cds into an object and its ivar using cd obj/@ivar/ syntax (note following /) + cds into an object and its ivar and back and then into another ivar using cd obj/@ivar/../@y syntax + cds into an object and its ivar and back again using cd obj/@ivar/.. syntax + should cd into an object and its ivar using cd obj/@ivar syntax + can cd into objects that redefine #respond_to? to return true + should cd into previous object and its local using cd ../local syntax + should be able to cd into the Object BasicObject + should break out to outer-most session with cd / + should start a session on TOPLEVEL_BINDING with cd :: + should cd into complex input (with spaces) + should not cd into complex input when it encounters an exception + should cd into simple input + can cd into an expression with division in it + should not leave the REPL session when given 'cd ..' + can cd into an expression containing a string with slashes in it + should break out of session with cd .. + old stack toggling with `cd -` + when using cd / + should toggle + when using ^D (Control-D) key press + should keep correct old binding + when using simple cd syntax + should toggle + series of cd calls + should toggle with fuzzy `cd -` calls + when using cd .. + should toggle with a complex path + should toggle with a simple path + when using cd :: + should toggle + when an error was raised + should not toggle and should keep correct stacks + when using complex cd syntax + should toggle with a complex path (more complex case) + should toggle with a complex path (simple case) + in fresh pry instance + should not toggle when there is no old stack + +exit-program + should raise SystemExit + should exit the program with the provided value + +exit-all + should have empty binding_stack after breaking out of the repl + should break out of the repl and return nil + should break out of the repl even if multiple bindings still on stack + should break out of the repl wth a user specified value + +Pry::Config::Attributable + #attribute + creates a reader attribute for the given name + creates a writer attribute for the given name + and when the attribute is invoked + sends the 'call' message to the value + +Pry::Output + #height + returns the number of rows + #decolorize_maybe + when the given pry instance has 'color' disabled + returns decolorized string + when the given pry instance has 'color' enabled + returns the given string without modifications + #print + returns nil + when the given pry instance has 'color' enabled + doesn't decolorize output + when the given pry instance has 'color' disabled + decolorizes output + #write + is expected to eq # + #tty? + when the output responds to #tty? and is not a TTY returns false - when given value matches command regex + when the output doesn't respond to #tty? + returns false + when the output responds to #tty? and is a TTY returns true - .command_options - when no argument is given - and when command options were not defined previously - sets command options to default options - and when command options were defined previously - returns memoized command options - when given an argument - merges the argument with command options - #run - runs a command from another command - .name - returns the name of the command - when super command name exists - returns the name of the parent command - .state - returns a command state - .command_regex - when use_prefix is true - returns a Regexp without a prefix - when use_prefix is false - returns a Regexp with a prefix - #void - returns void value - #process_line - sets arg_string - sets captures - collision warnings - when collision warnings are not set - prints a warning when there's a collision - when collision warnings are configured - prints a warning when there's a collision - .command_name - returns listing - .match - when given an argument - and when match is an object - sets command options with listing as object's inspect - and when match is a string - sets command options with listing as match - when no argument is given - and when match was not defined previously - sets match to nil - and when match was defined previously - doesn't overwrite match - #check_for_command_collision - when a command collides with a local variable - displays a warning - when a command doesn't collide - doesn't display a warning - when a command collides with a method - displays a warning - #complete - returns empty array - .description - when given an argument - sets description - and when description was defined previously - doesn't overwrite match - and when description was not defined previously - sets description to nil - .source - returns source code of the method - .group - when name is given - sets group to that name - when source file matches a pry command - sets group name to command name - when source file matches 'pryrc' - sets group name to pryrc - when source file matches a pry plugin - sets group name to plugin name - when source file doesn't match anything - returns '(other)' - .convert_to_regex - when given object is a String - escapes the string as a Regexp - when given object is an Object - returns the given object - #commands - returns command set as a hash - #interpolate_string - when given string doesn't contain #{ - returns the given string - when given string contains #{ - returns the result of eval within target - .source_file - returns source file - .match_score - when command regex doesn't match given value - returns -1 - when command regex matches given value - and when the size of last match is 1 or 0 - returns the length of the last match - and when the size of last match is more than 1 - returns the length of the first match - .source_line - returns source line + #width + returns the number of columns + #size + when the output is not a tty + and ENV has size info in ROWS and COLUMNS + returns the ENV variable winsize + and ENV has size info in LINES and COLUMNS + returns ENV variable winsize + when the output is not a tty, and no info in ENV and no Readline info + and when there's ANSICON ENV variable + and when it cannot be matched + returns the default winsize + and when it can be matched + and when the size consists of positive integers + returns the ansicon winsize + and when the size has a zero column + returns the default winsize + and when there's no ANSICON ENV variable + returns the default winsize + when the output is not a tty and no info in ENV + when Readline's size has zero column + returns the default size + when Readline's size has no zeroes + returns the Readline winsize + when the output is a tty and responds to winsize + returns the io/console winsize + #method_missing + when the output responds to the given method name + forwards the method to the output + when the output doesn't respond to the given method name + raises NoMethodError + #respond_to_missing? + when the output doesn't respond to the given method name + doesn't find the method + when the output responds to the given method name + finds the method that is not defined on self + #<< + is expected to eq # + #puts + returns nil + when given an empty array + prints a newline + when given multiple empty arrays + prints multiple newline + when given convertible to array objects + prints the converted objects + when the given pry instance has 'color' disabled + decolorizes output + when given non-convertible to array objects + prints the non-converted objects in its string form + and when the object's #to_s has a newline + doesn't print a double newline + when the given pry instance has 'color' enabled + doesn't decolorize output -help - should sort the output of the 'help' command - should display help for a command with a spaces in its name - should display help for a specific command - should display help for all commands with a description - should display help for a regex command with a "listing" +Pry::Config::MemoizedValue + #call + doesn't conflate falsiness with unmemoizedness + memoizes the result of call -disable-pry - should quit the current session - should set DISABLE_PRY +Pry::REPL + should let you run commands in the middle of multiline expressions + should rescue exceptions + space prefix + with 1 space + it prioritizes variables over commands + with more than 1 space + prioritizes commands over variables + #piping? + returns false when $stdout is a non-IO object + autoindent + should raise no exception when indented with a tab (PENDING: Temporarily skipped with xit) + eval_string and binding_stack + shouldn't break if we start a nested instance + shouldn't break if we pop bindings in Ruby + should immediately evaluate eval_string after cmd if complete + shouldn't break if we start a nested REPL -show-source - doesn't show the source and deliver an error message without exclamation point - should output the source of a method defined inside Pry - should output a method's source - should raise a CommandError when super method doesn't exist - should not find normal methods with self#moo - should output source for an instance method defined inside pry - should find normal methods (i.e non-instance methods) by default - should output source for a repl method defined using define_method - should output a method's source with line numbers - should find methods even if there are spaces in the arguments - should output the source of a command defined inside Pry - should output a method's source if inside method and no name given - should find instance methods if no normal methods available - should find instance_methods if the class overrides instance_method - should output a method's source inside method using the -l switch - should not find instance methods with self.moo - should output a method's source with line numbers starting at 1 - should output help - should find normal methods with self.moo - should find instance methods with self#moo - should find methods even if the object overrides method method - should not show the source when a non-extant method is requested - show-source --doc - when the --line-numbers switch is provided - outputs a method's docs with line numbers - when given a nested class - shows docs for the nested classes - when given a method with a doc - finds the method's documentation - when given a class with a doc - shows documentation for the code object along with source code - when the Const = Class.new syntax is used - shows documentation for the class - the --all switch behavior - when --all is not used and there's only 1 candidate for the class - doesn't mention anything about monkeypatches - when there are monkeypatches in different files - shows them - when --all is not used but there are multiple monkeypatches - correctly displays the number of monkeypatches - mentions available monkeypatches - displays the original definition first - when included module has docs and there are intermediary docless modules - shows nth level included module doc - shows a warning about module reversion - should set _file_ and _dir_ - sets _file_ and _dir_ to file containing method source - when the current context is a non-nested class - shows docs for the nested classes - code highlighting - when there's code in the docs - highlights the code - when there's inline code with backticks the docs - doesn't highlight the backticks - when there's inline code in the docs - highlights the code - when given a 'broken' module - skips over the module - when the --base-one switch is provided - outputs a method's docs with line numbering starting at 1 - when the current context is a method - outputs the method without needing to use its name - when provided a class without docs that has a superclass with docs - shows a warning about superclass reversion - shows the docs of the superclass - when #call is defined on Symbol - still finds documentation - when both the base mod and the included module have no docs - raises Pry::CommandError - when provided a class without docs that has a superclass without docs - raises Pry::CommandError - when given a class defined in a REPL session - shows documentation for the class - when no docs can be found for the given method - raises Pry::CommandError - when used against a command - displays help for a command with a spaces in its name - displays help for a specific command - displays help for a regex command with a "listing" - class commands - when looking up by command name - displays help - when class is used (rather than command name) is used for lookup - displays actual preceding comment for a class command - when the --super switch is provided - and when it's passed twice - finds the parent method docs - and when it's passed once - finds the super method docs - and when the super method doesn't exist - raises Pry::CommandError - and when the explicit argument is not provided - finds super method docs with multiple `--super` switches - finds super method docs without explicit method argument - and when it's passed thrice - finds the grandparent method docs - when provided a class without docs that has nth superclass with docs - shows the docs of the superclass - shows a warning about superclass reversion - when no class/module arg is given - returns the doc for the current module - when the Const = Module.new syntax is used - shows documentation for the module - when given a proc - should show documentation for object - when the module with docs was included in another module - shows a warning about the included module reversion - shows the included module's doc - when given a module with a doc - shows documentation for the code object along with source code - when no docs can be found for the given class - raises Pry::CommandError - can't find class/module code - for modules - errors when module has no included module to show - shows nth level included module code (when no intermediary modules have code either) - shows correct warning when reverting to nth level included module - shows warning when reverting to included module code - shows included module code - for classes - ignores included modules - shows nth level superclass code (when no intermediary superclasses have code either) - shows correct warning when reverting to nth level superclass - errors when class has no superclass to show - shows warning when reverting to superclass code - shows superclass code - should set _file_ and _dir_ - should set _file_ and _dir_ to file containing method source - on variable or constant - outputs source of its class if variable doesn't respond to source_location - outputs source of its class if constant doesn't respond to source_location - on sourcable objects - should output source defined inside pry - should output source for procs/lambdas stored in variables - should output source for procs/lambdas stored in constants - should output source for method objects - on variables that shadow methods - source of variable takes precedence over method that is being shadowed - source of method being shadowed should take precedence over variable - if given self.meth_name syntax - on commands - create_command commands - should show source for a command - should show source for a command defined inside pry - block commands - should show source for a command with spaces in its name - should show source for a command by listing name - should output source of commands using special characters - should show source for an ordinary command - real class-based commands - should show source for a command defined inside pry - should show source for a command - finding super methods with help of `--super` switch - finds super methods with multiple --super - finds super methods with explicit method argument - finds super methods without explicit method argument - with -e option - shows the source code for the returned value as Ruby - when there's no source code but the comment exists - outputs zero line numbers - on modules - should lookup nested modules - should lookup module name with respect to current context - in REPL - should find superclass defined in repl - should find class defined in repl - show-source -a - when there are class method monkeypatches in different files - shows the source for all monkeypatches - when -a is not used and there's only one candidate for the class - doesn't mention anything about monkeypatches - when there are instance method monkeypatches in different files - shows the source for all monkeypatches - when there are instance-eval monkeypatches in different files - shows the source for all monkeypatches - when there are class-eval monkeypatches in different files - shows the source for all monkeypatches - ignores -a because object is not a module - when -a is not used and there are multiple monkeypatches - mentions available monkeypatches - when show-source is invoked without a method or class argument - inside a module - should display module source by default - should allow options to be passed - displays method code (rather than class) if Pry started inside method binding - should be unable to find module source if no methods defined - should display class source when inside instance - monkey-patched C modules - when current context is something other than a C object - should display a candidate, not a warning - when current context is a C object - recommends to use the --all switch when other candidates are found - should display a warning, and not monkey-patched definition - should skip over broken modules - should return source for first valid module - basic functionality, should find top-level module definitions - should show source for a super class when Const = Class.new syntax is used - should show source for a class - should show source for a super class - should show source for a class when Const = Class.new syntax is used - should show source for a module - should show source for an ancestor module - should show source for a module when Const = Module.new syntax is used +cat + with --in 1..2 + should display the given range with indices, omitting nils + with --ex + cat --ex should display repl code that generated exception + cat --ex should correctly display code that generated exception + on receiving a file that does not exist + should display an error message + when invoked without arguments + should display an error message + with --ex N + should cat second level of backtrace when --ex 1 used + should cat first level of backtrace when --ex 0 used + each successive cat --ex should show the next level of backtrace, and going past the final level should return to the first + should cat third level of backtrace when --ex 2 used + should show error when backtrace level out of bounds + should cat first level of backtrace when --ex used with no argument + with --in -1 + should display the last expression with no index + with --in + should display the last few expressions with indices + with --in 1 + should display the first expression with no index -ri - prints an error message without an argument +Pry::Code + #grep + when pattern is specified + returns lines matching the pattern + when pattern is nil + returns self + #select + selects lines matching a condition + returns a code object + #around + when line number is an integer + selects one line around the specified line number + and we specify how many lines to select + selects more than 1 line around + when line number is nil + returns self + #before + when line number is an integer + selects one line before the specified line number + and we specify how many lines to select + selects more than 1 line before + when line number is nil + returns self + #nesting_at + returns an Array of open modules + Pry::Code() + when given an Array + reads lines from the array + when given a Proc + reads lines from proc + when given a Method + reads lines from bound method + when given a Pry::Method + reads lines from Pry::Method + when given an UnboundMethod + reads lines from unbound methods + when given a Code object + returns the passed parameter unchanged + #reject + rejects lines matching a condition + returns a code object + #respond_to_missing? + when a String responds to the given method + finds the method that is not defined on self + when a String does not respond to the given method + doesn't find the method + #== + when an empty code is compared with another empty code + returns true + when a code is compared with another code with different lines + returns true + when a code is compared with another code with identical lines + returns true + #to_s + returns a string representation of code + #expression_at + returns a multiline expressiong starting on the given line number + #with_marker + shows a marker in the right place + #push + appends lines to the code + is an alias of #<< + #comment_describing + returns a comment describing expression + #take_lines + takes N lines from start_line + #raw + when code has a marker + returns an unformatted String of all lines + .from_file + raises error when file doesn't exist + reads lines from a file relative to current pwd + sets code type according to the file + reads lines from a file relative to origin pwd with '.rb' omitted + reads lines from a file on disk + reads lines from a file relative to origin pwd + when reading files from $LOAD_PATH + recognizes Gemfile as a Ruby file + finds Ruby files with omitted '.rb' extension + finds files with '.rb' extensions + finds files in a relative directory with '.rb' omitted + finds files in a relative directory with '.rb' extension + doesn't confuse files with the same name, but with an extension + doesn't confuse files with the same name, but without an extension + when reading lines from a file without an extension + sets code type to :unknown + when readling lines from Pry's line buffer + reads entered lines + can specify file type manually + #with_line_numbers + appends line numbers to code + .from_method + reads lines from a method's definition + #max_lineno_width + when there are less than 100 lines + returns 2 + when there are less than 10 lines + returns 1 + when there are less than 1000 lines + returns 3 + #length + returns how many lines the code object has + #with_indentation + indents lines + .from_module + reads line from a class + sets code type to :ruby + #after + when line number is an integer + selects one line around the specified line number + and we specify how many lines to select + selects more than 1 line around + when line number is nil + returns self + #between + when a negative start_line is specified + returns a line from the end + when both start_line and end_line are specified + removes all lines that aren't in the given range + returns a code object + when a negative end_line is specified + returns a range of lines from the end + when start_line is nil + returns self + when start_line is a Range + returns a range fo lines corresponding to the given Range + when only start_line is specified + returns a code object + removes leaves only the specified line + #method_missing + when a String does not respond to the given method + raises NoMethodError + when a String responds to the given method + forwards the method to a String instance + #highlighted + returns a highlighted for terminal string representation of code -jump-to - jumps to the proper binding index in the stack - prints error when trying to jump to a non-existent binding index - prints an error when trying to jump to the same binding index +Pry + default print + should not be phased by un-inspectable things + doesn't leak colour for object literals + should output the right thing + should include the => + output failsafe + should catch errors serializing exceptions + should catch serialization exceptions + should display serialization exceptions + color + should colorize strings as though they were ruby + should not colorize strings that already include color + custom non-IO object as $stdout + does not crash pry + output_prefix + should be able to change output_prefix + output suppression + should normally output the result + should not output something if the input is only a comment + should not output anything if the input ends with a semicolon + should output something if the input ends with a comment -Formatting Table - knows about colorized fitting - decide between one-line or indented output - line length is smaller than the length of the longest word - should not raise error - should format output as one column - formatting - should order downward and wrap to columns - should handle the basic case - should handle... another basic case - should handle one-token input - should handle colors - should handle a tiny case - should handle empty input +Pry::Indent + should indent an array + should indent statements such as if, else, etc + should indent cunningly disguised ifs + should indent separate lines + should indent a module and class + should not indent single line statements + should not indent inside strings + should not indent single-line ifs + should correctly handle while do + should ident case statements + should not raise error, if MIDWAY_TOKENS are used without indentation + should indent a hash + should indent a function + should indent begin rescue end + should indent correctly with nesting + should not indent inside HEREDOCs + should differentiate single/multi-line unless + should not indent nested HEREDOCs + should not indent single-line rescue + should not indent single/multi-line until + should handle multiple open and closing tokens on a line + should properly indent nested code + nesting + should parse nesting on line 6 of example_nesting.rb + should parse nesting on line 7 of example_nesting.rb + should parse nesting on line 25 of example_nesting.rb + should fail to parse nesting on line 17 of example_nesting.rb + should parse nesting on line 5 of example_nesting.rb + should parse nesting on line 26 of example_nesting.rb + should parse nesting on line 23 of example_nesting.rb + should parse nesting on line 28 of example_nesting.rb + should parse nesting on line 3 of example_nesting.rb + should parse nesting on line 16 of example_nesting.rb + should parse nesting on line 2 of example_nesting.rb + should parse nesting on line 32 of example_nesting.rb + should parse nesting on line 14 of example_nesting.rb + should parse nesting on line 4 of example_nesting.rb + should fail to parse nesting on line 19 of example_nesting.rb + should parse nesting on line 13 of example_nesting.rb + should parse nesting on line 29 of example_nesting.rb + should parse nesting on line 33 of example_nesting.rb + should parse nesting on line 27 of example_nesting.rb + should parse nesting on line 22 of example_nesting.rb + should parse nesting on line 10 of example_nesting.rb + should fail to parse nesting on line 30 of example_nesting.rb + should fail to parse nesting on line 20 of example_nesting.rb + should parse nesting on line 8 of example_nesting.rb + should fail to parse nesting on line 21 of example_nesting.rb + should parse nesting on line 24 of example_nesting.rb + should parse nesting on line 9 of example_nesting.rb + should parse nesting on line 15 of example_nesting.rb + should fail to parse nesting on line 18 of example_nesting.rb + should parse nesting on line 11 of example_nesting.rb + should parse nesting on line 12 of example_nesting.rb + should parse nesting on line 1 of example_nesting.rb + should parse nesting on line 31 of example_nesting.rb -Pry::Config::Value - #call - when given value is a LazyValue - calls the LazyValue object - when given value is a Proc - returns the value as is - when given value is a non-callable object - returns the value as is - when given value is a MemoizedValue - calls the MemoizedLazy object +save-file + saving methods + single method + should save a method to a file + should save a method to a file truncated by --lines + should display a success message on save + --append + should append to end of specified file + overwrite by default (no --append) + should overwrite specified file with new input + -f + should save a file to a file + saving commands + should save a command to a file + -i + should save input expressions to a file (single expression) + should save multi-ranged input expressions + should save input expressions to a file (range) + should display a success message on save -Pry::BlockCommand - #help - returns help output - #call - when passed a variable-length array - calls the block with some arguments - calls the block without arguments - when #process accepts no arguments - calls the block despite passed arguments - when #process accepts some arguments - calls the block even if there's not enough arguments - calls the block even if there are more arguments than needed +Pry::Method::Patcher + should change the behaviour of the method + should return a new method with new source + should change the source of new Pry::Method objects + should preserve visibility -Pry::Pager - PageTracker - doesn't count ansi color codes towards length - records short lines that don't add up to a page - records short lines that do add up to a page - records a string with an embedded newline - doesn't count a line until it ends - treats a long line as taking up more than one row +raise-up + should raise the exception with raise-up + should jump immediately out of nested contexts with ! + should allow you to cd up and (eventually) out + should raise the most recently raised exception + should raise an unamed exception with raise-up + should eat the exception at the last new pry instance on raise-up -Pry.run_command - can perform a show-source - performs a simple ls +pry_backtrace + should print a backtrace + +Readline + is not loaded on requiring 'pry' + is loaded on invoking 'pry' + is not loaded on invoking 'pry' if Pry.input is set Pry::Method should use String names for compatibility - .from_binding - should find the right method even if it was renamed and replaced - should be able to pick a method out of a binding - should find the super method correctly - should not find a wrong method by matching on nil source location - should NOT find a method from the toplevel binding - should find the right method from a BasicObject - should find the right method if a super method exists - should find methods that have been undef'd #owner when it is overriden in Object correctly reports the owner - super - jumps up multiple levels of bound method, even through modules - should be able to find super methods defined on super-classes when there are modules in the way - should return nil if no super method exists - should be able to find the super method of an unbound method - should be able to find super methods defined on modules - should be able to find the super method on a bound method - .from_str - should take care of corner cases like mongo[] e.g Foo::Bar.new[]- issue 998 - should look up methods using the object.method syntax - should take care of cases like $ mongo[] - issue 998 - should NOT look up instance methods using the Class#method syntax if no instance methods defined - should look up instance methods if "instance-methods" option provided - should not raise an exception if receiver does not exist - looks up instance methods first even if methods available and no options provided - should look up methods if :methods option provided - looks up instance methods if no methods available and no options provided - should look up instance methods using the Class#method syntax - should look up methods using klass.new.method syntax - looks up methods if no instance methods available and no options provided - should NOT look up methods using the object.method syntax if no methods defined - should look up instance methods using klass.meth#method syntax - should look up methods using instance::bar syntax - #receiver - when it is overriden in Object - correctly reports the receiver all_from_obj on classes should find methods defined on Kernel - should find methods defined on Class - should find methods defined on modules extended into the class should not find methods defined within the class - should attrbute overridden methods to the class not the module + should find methods defined on the singleton class of super-classes should find methods defined in the class' singleton class attributes overridden methods to the relevant singleton class in preference to Class should attribute overridden methods to the sub-class' singleton class - should find methods defined on the singleton class of super-classes - method resolution order - should not include singleton classes of numbers - should include the singleton class of objects - should look at a class and then its superclass - should include the included modules between a class and its superclass - includes the Pry::Method.instance_resolution_order of Class after the singleton classes - should include modules at the point which they would be reached - should include modules at most once - should include modules included into singleton classes - should include singleton classes for classes - should not include modules extended into the class - should include included modules for Modules + should attrbute overridden methods to the class not the module + should find methods defined on Class + should find methods defined on modules extended into the class on normal objects - should find methods in modules included into the object's singleton class - should work in the face of an overridden send should find methods defined in the object's singleton class - should find methods defined in modules included into the object's class should find methods defined in the object's class + should find methods in modules included into the object's singleton class + should work in the face of an overridden send should find methods all the way up to Kernel should not find methods defined on the classes singleton class + should find methods defined in modules included into the object's class + method resolution order + should include the included modules between a class and its superclass + should look at a class and then its superclass + should include singleton classes for classes + should include modules included into singleton classes + should not include singleton classes of numbers + should not include modules extended into the class + should include included modules for Modules + should include modules at the point which they would be reached + should include modules at most once + includes the Pry::Method.instance_resolution_order of Class after the singleton classes + should include the singleton class of objects + .signature + should print the name of keyword args, with : after the arg name + should print the name of keyword args, with :? after the arg name + should print the name of optional args, with =? after the arg name + should print the name of additional args, with an * label + should print the name of block args, with an & label + should print the name of regular args + #parameters + when it is overriden in Object + correctly reports the parameters + super + jumps up multiple levels of bound method, even through modules + should be able to find the super method of an unbound method + should be able to find the super method on a bound method + should be able to find super methods defined on modules + should be able to find super methods defined on super-classes when there are modules in the way + should return nil if no super method exists + .from_str + should look up instance methods using klass.meth#method syntax + should look up methods using instance::bar syntax + should take care of cases like $ mongo[] - issue 998 + should take care of corner cases like mongo[] e.g Foo::Bar.new[]- issue 998 + should not raise an exception if receiver does not exist + should NOT look up instance methods using the Class#method syntax if no instance methods defined + should look up instance methods using the Class#method syntax + looks up instance methods first even if methods available and no options provided + should look up methods using klass.new.method syntax + looks up methods if no instance methods available and no options provided + should look up instance methods if "instance-methods" option provided + should look up methods if :methods option provided + should look up methods using the object.method syntax + should NOT look up methods using the object.method syntax if no methods defined + looks up instance methods if no methods available and no options provided all_from_class - finds instance methods defined in modules included into this class - finds private and protected instance methods defined in a class - should attribute overridden methods to the sub-class should be able to find instance methods defined in a super-class + should attribute overridden methods to the sub-class + finds instance methods defined in modules included into this class should be able to find public instance methods defined in a class + finds private and protected instance methods defined in a class + should be able to find methods defined on a singleton class finds instance methods defined in modules included into super-classes - should find methods all the way up to Kernel should be able to find methods on super-classes when given a singleton class - should be able to find methods defined on a singleton class - .signature - should print the name of block args, with an & label - should print the name of keyword args, with : after the arg name - should print the name of additional args, with an * label - should print the name of regular args - should print the name of keyword args, with :? after the arg name - should print the name of optional args, with =? after the arg name + should find methods all the way up to Kernel + #receiver + when it is overriden in Object + correctly reports the receiver + method_name_from_first_line + should work in all simple cases + .from_binding + should find the right method from a BasicObject + should be able to pick a method out of a binding + should find the right method if a super method exists + should not find a wrong method by matching on nil source location + should NOT find a method from the toplevel binding + should find the right method even if it was renamed and replaced + should find methods that have been undef'd + should find the super method correctly method aliases - should find aliases for top-level methods - should be able to find method aliases should return an empty Array if cannot find aliases should not include the own name in the list of aliases + should find aliases for top-level methods should be able to find aliases for methods implemented in C - method_name_from_first_line - should work in all simple cases - #parameters - when it is overriden in Object - correctly reports the parameters - -Pry.config.unrescued_exceptions - should rescue all exceptions NOT specified on unrescued_exceptions - should NOT rescue exceptions specified on unrescued_exceptions - -The bin/pry CLI - -I path - adds multiple additional paths to $LOAD_PATH - adds an additional path to $LOAD_PATH - ARGV forwarding - forwards ARGV as an empty array when -- is passed without following arguments - forwards its remaining arguments as ARGV when -- is passed - forwards its remaining arguments as ARGV when - is passed - forwards ARGV as an empty array when - is passed without following arguments - -Pry::CLI - .add_option_processor - returns self - adds an option processor - .add_options - returns self - when options is nil and a block is provided - sets the block as options - when options were previously set - overwrites the options proc that executes original options - overwrites the options proc that executes the provided block - .parse_options - when option exists - removes the existing option from ARGV - finalizes session setup - initializes session setup - when invalid option is provided - exits program - when option doesn't exist - raises error - when argv is passed with a double dash (--) - sets everything after the double dash as input args - when argv is passed with a dash (-) - sets everything after the dash as input args - when multiple options exist - processes only called options - .start - sets Pry.cli to true - when 'pry' is passed as an input arg - does not load files through repl - when the help option is provided - exits - when the context option is not provided - starts Pry in the top level - when the context option is provided - starts Pry in the provided context - initializes session setup - finalizes session setup - when there are some input args - loads files through repl and exits - -clear-screen - calls the "clear" command on non-Windows platforms - calls the "cls" command on Windows - -Pry::ControlDHandler - when given eval string is empty & pry instance has 2+ bindings - pops the binding off the stack - saves a dup of the current binding stack in the 'cd' command - when given eval string is non-empty - clears input buffer - when given eval string is empty & pry instance has one binding - throws :breakout - clears binding stack - -exit-all - should break out of the repl even if multiple bindings still on stack - should break out of the repl and return nil - should have empty binding_stack after breaking out of the repl - should break out of the repl wth a user specified value - -Pry::Indent - should indent a function - should not indent inside HEREDOCs - should indent an array - should not indent single-line rescue - should handle multiple open and closing tokens on a line - should indent a hash - should differentiate single/multi-line unless - should indent cunningly disguised ifs - should indent a module and class - should not raise error, if MIDWAY_TOKENS are used without indentation - should not indent inside strings - should not indent nested HEREDOCs - should ident case statements - should not indent single/multi-line until - should indent statements such as if, else, etc - should not indent single-line ifs - should correctly handle while do - should indent begin rescue end - should not indent single line statements - should properly indent nested code - should indent correctly with nesting - should indent separate lines - nesting - should parse nesting on line 8 of example_nesting.rb - should parse nesting on line 29 of example_nesting.rb - should fail to parse nesting on line 30 of example_nesting.rb - should parse nesting on line 3 of example_nesting.rb - should parse nesting on line 23 of example_nesting.rb - should parse nesting on line 27 of example_nesting.rb - should parse nesting on line 33 of example_nesting.rb - should parse nesting on line 31 of example_nesting.rb - should fail to parse nesting on line 20 of example_nesting.rb - should fail to parse nesting on line 19 of example_nesting.rb - should parse nesting on line 32 of example_nesting.rb - should parse nesting on line 28 of example_nesting.rb - should parse nesting on line 15 of example_nesting.rb - should parse nesting on line 25 of example_nesting.rb - should parse nesting on line 13 of example_nesting.rb - should parse nesting on line 14 of example_nesting.rb - should parse nesting on line 1 of example_nesting.rb - should parse nesting on line 2 of example_nesting.rb - should parse nesting on line 12 of example_nesting.rb - should parse nesting on line 9 of example_nesting.rb - should parse nesting on line 6 of example_nesting.rb - should parse nesting on line 4 of example_nesting.rb - should fail to parse nesting on line 18 of example_nesting.rb - should parse nesting on line 5 of example_nesting.rb - should parse nesting on line 11 of example_nesting.rb - should parse nesting on line 24 of example_nesting.rb - should parse nesting on line 22 of example_nesting.rb - should parse nesting on line 16 of example_nesting.rb - should parse nesting on line 7 of example_nesting.rb - should parse nesting on line 26 of example_nesting.rb - should parse nesting on line 10 of example_nesting.rb - should fail to parse nesting on line 21 of example_nesting.rb - should fail to parse nesting on line 17 of example_nesting.rb + should be able to find method aliases -reload_code - reload_current_file - raises an error source code not found - raises an error when class not found - reloads pry commmand - raises an error when pry command not found +test Pry defaults + should set the print default, and the default should be overridable + should set the hooks default, and the default should be overridable + should set the output default, and the default should be overridable + quiet + should hide whereami if quiet is set + should show whereami by default + pry return values + should return the parameter (self) given to exit-all + should return the parameter given to exit-all + should return the parameter (function call) given to exit-all + should return nil + should return the parameter (multi word string) given to exit-all + input + should not pass in the prompt if the arity is -1 + should pass in the prompt if readline arity is 1 + should set the input default, and the default should be overridable + should not pass in the prompt if the arity is 0 + prompts + sets the prompt default, and the default should be overridable (multi prompt) + sets the prompt default, and the default should be overridable (single prompt) + storing and restoring the prompt + should not pop the last prompt + should have a prompt stack + #pop_prompt should return the popped prompt + should restore overridden prompts when returning from shell-mode + #prompt= should replace the current prompt with the new prompt + when only one prompt on the stack + when several prompts on the stack + toplevel_binding + should have self the same as TOPLEVEL_BINDING + should define private methods on Object + should be devoid of local variables + view_clip used for displaying an object in a truncated format + given a regular object with an #inspect string longer than the maximum specified + when the object is a regular one + returns a string of the # format + when the object is a Class or a Module + with a #name longer than the maximum specified + returns a string of the # format + without a name (usually a c = Class.new) + returns a string of the # format + with a #name shorter than or equal to the maximum specified + returns a string of the # format + given an object with an #inspect string + returns the #<> format of the object (never use inspect) + given the 'main' object + returns the #to_s of main (special case) + the list of prompt safe objects + returns the #inspect of the special-cased immediate object: test + returns the #inspect of the custom prompt safe objects + returns the #inspect of the special-cased immediate object: -5 + returns the #inspect of the special-cased immediate object: 1 + returns #<> format of the special-cased immediate object if #inspect is longer than maximum + returns the #inspect of the special-cased immediate object: hello + returns the #inspect of the special-cased immediate object: 2.0 + given an object with an #inspect string as long as the maximum specified + returns the #<> format of the object (never use inspect) -Pry::Editor - .default - when $VISUAL is defined - returns the value of $VISUAL - when no editor is detected - shells out to find 'editor' - shells out to find 'vi' - shells out to find 'nano' - when platform is Windows - returns 'notepad' - when $EDITOR is defined - returns the value of $EDITOR - build_editor_invocation_string - should shell-escape files - invoke_editor with a proc - should not shell-escape files - build_editor_invocation_string on windows - should not shell-escape files +Pry::Ring + #clear + resets ring to initial state + #<< + keeps duplicate elements + adds elements as is when the ring is not full + overwrites elements when the ring is full + #to_a + returns a duplicate of internal buffer + #[] + when the ring is not full + reads elements + reads elements via range + when the ring is empty + returns nil + when the ring is full + reads elements + reads elements via exclusive range + returns the first element when accessed through 0..0 + reads elements via inclusive range Pry loading rc files - should not load the pryrc if pryrc's directory permissions do not allow this should not load the pryrc if it cannot expand ENV[HOME] - should not load the rc file twice if it's symlinked differently should not run the rc file at all if Pry.config.should_load_rc is false + should not load the rc file twice if it's symlinked differently should never run the rc file twice + should not load the pryrc if pryrc's directory permissions do not allow this that raise exceptions - should not raise exceptions - should output an error should continue to run pry + should output an error + should not raise exceptions -Pry::Output - #<< - is expected to eq # - #puts - returns nil - when given convertible to array objects - prints the converted objects - when the given pry instance has 'color' disabled - decolorizes output - when the given pry instance has 'color' enabled - doesn't decolorize output - when given non-convertible to array objects - prints the non-converted objects in its string form - and when the object's #to_s has a newline - doesn't print a double newline - when given an empty array - prints a newline - when given multiple empty arrays - prints multiple newline - #respond_to_missing? - when the output doesn't respond to the given method name - doesn't find the method - when the output responds to the given method name - finds the method that is not defined on self - #decolorize_maybe - when the given pry instance has 'color' enabled - returns the given string without modifications - when the given pry instance has 'color' disabled - returns decolorized string - #print - returns nil - when the given pry instance has 'color' enabled - doesn't decolorize output - when the given pry instance has 'color' disabled - decolorizes output - #width - returns the number of columns - #write - is expected to eq # - #method_missing - when the output doesn't respond to the given method name - raises NoMethodError - when the output responds to the given method name - forwards the method to the output - #height - returns the number of rows - #size - when the output is a tty and responds to winsize - returns the io/console winsize - when the output is not a tty - and ENV has size info in ROWS and COLUMNS - returns the ENV variable winsize - and ENV has size info in LINES and COLUMNS - returns ENV variable winsize - when the output is not a tty and no info in ENV - when Readline's size has no zeroes - returns the Readline winsize - when Readline's size has zero column - returns the default size - when the output is not a tty, and no info in ENV and no Readline info - and when there's no ANSICON ENV variable - returns the default winsize - and when there's ANSICON ENV variable - and when it can be matched - and when the size has a zero column - returns the default winsize - and when the size consists of positive integers - returns the ansicon winsize - and when it cannot be matched - returns the default winsize - #tty? - when the output responds to #tty? and is not a TTY - returns false - when the output doesn't respond to #tty? - returns false - when the output responds to #tty? and is a TTY - returns true +Pry::ColorPrinter + .default + prints output prefix with value + .pp + when #inspect raises Pry::Pager::StopPaging + propagates the error + when #inspect returns an object literal + prints the object inspect + and when SyntaxHighlighter returns a token that doesn't start with '' + prints the object with escape characters + and when SyntaxHighlighter returns a token starting with '' + prints the object as is + when an exception is raised in #inspect + still prints a string + when no exception is raised in #inspect + prints a string with a newline + when printing a BasicObject + prints a string -Sticky locals (_file_ and friends) - locals should keep value after cd-ing (_file_ and _dir_) - locals should return last result (_) - locals should keep value after cd-ing (pry_instance) - locals should all exist upon initialization - locals should still exist after cd-ing into a new context - locals should return second last result (__) - _ex_ - keeps its value after cd-ing - returns the last exception without wrapping it in a LastException - User defined sticky locals - should still exist after cd-ing into new binding - should create a new sticky local - should provide different values for successive block invocations - setting as Pry.config option - should define a new sticky local for the session (normal value) - should define a new sticky local for the session (proc) - passing in as hash option when creating pry instance - should define a new sticky local for the session (normal value) - should define multiple sticky locals - should define a new sticky local for the session (as Proc) - hash option value should override config value - should define a new sticky local for the session (normal value) +Pry::Warning + #warn + prints message with file and line of the calling frame -Pry::Config::Attributable - #attribute - creates a reader attribute for the given name - creates a writer attribute for the given name - and when the attribute is invoked - sends the 'call' message to the value +Pry::Config::Value + #call + when given value is a LazyValue + calls the LazyValue object + when given value is a non-callable object + returns the value as is + when given value is a Proc + returns the value as is + when given value is a MemoizedValue + calls the MemoizedLazy object + +Pry::Helpers::DocumentationHelpers + get_comment_content + should remove shebangs + should unindent past separators + should strip off the hash and unindent + should strip out leading lines of hashes + process_rdoc + should syntax highlight code in + should not double-highlight backticks inside indented code + should highlight words surrounded by +s + should syntax highlight things in backticks + should not remove ++ + should emphasise italic tags + should syntax highlight code in + should emphasise em tags + should syntax highlight indented code + should not syntax highlight already highlighted code Pending: (Failures listed here are expected and do not affect your suite's status) @@ -3393,22 +3429,22 @@ # Temporarily skipped with xit # ./spec/integration/bundler_spec.rb:10 - 3) ls on java objects should include java-esque aliases if requested + 3) ls on java objects should omit java-esque aliases by default # No reason given - # ./spec/commands/ls_spec.rb:302 + # ./spec/commands/ls_spec.rb:295 - 4) ls on java objects should omit java-esque aliases by default + 4) ls on java objects should include java-esque aliases if requested # No reason given - # ./spec/commands/ls_spec.rb:295 + # ./spec/commands/ls_spec.rb:302 5) Pry::REPL autoindent should raise no exception when indented with a tab # Temporarily skipped with xit # ./spec/pry_repl_spec.rb:127 -Finished in 16.81 seconds (files took 1.63 seconds to load) +Finished in 9.27 seconds (files took 0.64454 seconds to load) 1437 examples, 0 failures, 5 pending -Randomized with seed 12389 +Randomized with seed 16051 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -3443,12 +3479,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/77754/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/50351 and its subdirectories -I: Current time: Tue Mar 4 04:31:42 -12 2025 -I: pbuilder-time-stamp: 1741105902 +I: removing directory /srv/workspace/pbuilder/77754 and its subdirectories +I: Current time: Tue Apr 7 12:55:30 +14 2026 +I: pbuilder-time-stamp: 1775516130