From 500456032c65a339266f948036f7d2bc2fc88791 Mon Sep 17 00:00:00 2001 From: John Mair Date: Sat, 15 Jan 2011 19:57:50 +1100 Subject: [PATCH] oops, fixed bug in prompts.rb where was using nest instead of nest_level --- README.markdown | 6 +----- lib/pry/prompts.rb | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.markdown b/README.markdown index 1dfed43c..06c6eebf 100644 --- a/README.markdown +++ b/README.markdown @@ -151,7 +151,7 @@ end. `jump_to`, `ls`, `cd`, `cat` * Pry gives good control over nested sessions (important when exploring complicated runtime state) * Pry is not based on the IRB codebase. -* Pry supports significant customizability. +* Pry allows significant customizability. * Pry uses [RubyParser](https://github.com/seattlerb/ruby_parser) to validate expressions in 1.8, and [Ripper](http://rdoc.info/docs/ruby-core/1.9.2/Ripper) for 1.9. * Pry implements all the methods in the REPL chain separately: `Pry#r` @@ -323,9 +323,6 @@ Setting Pry's global output causes all subsequent Pry instances to use this output by default: Pry.output = StringIO.new - Object.pry - - Object.instance_variable_get(:@x) #=> 10 #### Example: Setting output for a specific session @@ -334,7 +331,6 @@ As per Input, given above, we set the local output as follows: ##### At session start Pry.start(Object, :output => StringIO.new("@x = 10\nexit")) - Object.instance_variable_get(:@x) #=> 10 ##### At runtime diff --git a/lib/pry/prompts.rb b/lib/pry/prompts.rb index a48f570d..746022c9 100644 --- a/lib/pry/prompts.rb +++ b/lib/pry/prompts.rb @@ -1,7 +1,7 @@ class Pry DEFAULT_PROMPT = [ proc do |target_self, nest_level| - if nest == 0 + if nest_level == 0 "pry(#{Pry.view(target_self)})> " else "pry(#{Pry.view(target_self)}):#{Pry.view(nest_level)}> " @@ -9,7 +9,7 @@ class Pry end, proc do |target_self, nest_level| - if nest == 0 + if nest_level == 0 "pry(#{Pry.view(target_self)})* " else "pry(#{Pry.view(target_self)}):#{Pry.view(nest_level)}* "