lib/rib/api.rb in rib-1.1.2 vs lib/rib/api.rb in rib-1.1.3

- old
+ new

@@ -39,11 +39,11 @@ input, result, err = get_input, nil, nil throw(:rib_exit, input) if config[:exit].include?(input) result, err = eval_input(input) if err print_eval_error(err) - elsif input.strip != '' && result != Rib::Skip + elsif input.strip != '' print_result(result) else # print nothing for blank input end [result, err] @@ -77,10 +77,10 @@ eval_binding.eval(input, "(#{name})", line) end # Print result using #format_result def print_result result - puts(format_result(result)) + puts(format_result(result)) if result != Rib::Skip rescue StandardError, SyntaxError => e Rib.warn("Error while printing result:\n #{format_error(e)}") end # Print evaluated error using #format_error