injecting target_self into command scope (the self of the active binding)
This commit is contained in:
parent
7217eafcf3
commit
e85235221b
|
@ -14,6 +14,8 @@
|
|||
* cat --ex N and edit --ex N now can navigate through backtrace, where cat --ex (with no args) moves throuh successive levels of the backtrace automatically with state stored on the exceptino object itself
|
||||
* new option Pry.config.exception_window_size determines window size for cat --ex
|
||||
* input_stack now implemented - pushing objects onto a pry instance's input_stack causes the instance to read from those objects in turn as it encounters EOF on the previous object. On finishing the input_stack the input object for the pry instance is set back to Pry.config.input, if this fails, pry breaks out of the REPL (throw(:breakout)) with an error message
|
||||
* Pry.config.system() defines how pry runs system commands
|
||||
* now injecting target_self method into command scope
|
||||
|
||||
8/9/2011 version 0.9.5
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ class Pry
|
|||
|
||||
attr_accessor :output
|
||||
attr_accessor :target
|
||||
attr_accessor :target_self
|
||||
attr_accessor :captures
|
||||
attr_accessor :eval_string
|
||||
attr_accessor :arg_string
|
||||
|
|
|
@ -154,6 +154,7 @@ class Pry
|
|||
# set some useful methods to be used by the action blocks
|
||||
context.opts = options
|
||||
context.target = target
|
||||
context.target_self = target.eval('self')
|
||||
context.output = output
|
||||
context.captures = options[:captures]
|
||||
context.eval_string = options[:eval_string]
|
||||
|
|
Loading…
Reference in New Issue