lib/input_sequencer.rb in markdown_exec-2.0.2 vs lib/input_sequencer.rb in markdown_exec-2.0.3

- old
+ new

@@ -32,10 +32,11 @@ inherited_dependencies: next_state.inherited_dependencies, inherited_lines: next_state.inherited_lines, prior_block_was_link: next_state.prior_block_was_link.nil? ? current.prior_block_was_link : next_state.prior_block_was_link ) rescue + pp backtrace binding.irb end # Generates the next menu state based on provided attributes. @@ -73,15 +74,18 @@ break if exit_when_bq_empty && bq_is_empty? && !now_menu.prior_block_was_link if now_menu.display_menu exit_when_bq_empty = false - run_yield :display_menu, &block choice = run_yield :user_choice, &block + if choice.nil? + raise "Block not recognized." + break + end break if run_yield(:exit?, choice&.downcase, &block) # Exit loop and method to terminate the app next_state = run_yield :execute_block, choice, &block # imw_ins next_state, 'next_state' pp [__LINE__, 'next_state', next_state] if @debug @@ -113,9 +117,10 @@ # imw_ins next_menu, 'next_menu' end now_menu = InputSequencer.merge_link_state(now_menu, next_menu) end rescue + pp backtrace binding.irb end end return if __FILE__ != $PROGRAM_NAME