oops, fixed bug in prompts.rb where was using nest instead of nest_level

This commit is contained in:
John Mair 2011-01-15 19:57:50 +11:00
parent 056751245f
commit 500456032c
2 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -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)}* "