lib/markdown_exec.rb in markdown_exec-1.8.4 vs lib/markdown_exec.rb in markdown_exec-1.8.5
- old
+ new
@@ -47,20 +47,25 @@
def dp(str)
lout " => #{str}", level: DISPLAY_LEVEL_DEBUG
end
+def rbi
+ pp(caller.take(4).map.with_index { |line, ind| " - #{ind}: #{line}" })
+ binding.irb
+end
+
def rbp
rpry
pp(caller.take(4).map.with_index { |line, ind| " - #{ind}: #{line}" })
binding.pry
end
def bpp(*args)
pp '+ bpp()'
pp(*args.map.with_index { |line, ind| " - #{ind}: #{line}" })
- rbp
+ rbi
end
def rpry
require 'pry-nav'
require 'pry-stack_explorer'
@@ -526,9 +531,11 @@
def run
initialize_and_parse_cli_options
execute_block_with_error_handling
rescue StandardError
error_handler('run')
+ ensure
+ yield if block_given?
end
private
def run_last_script