cli/ruby-debug/commands/breakpoints.rb in ruby-debug-0.10.2 vs cli/ruby-debug/commands/breakpoints.rb in ruby-debug-0.10.3

- old
+ new

@@ -70,10 +70,14 @@ end unless LineCache.trace_line_numbers(brkpt_filename).member?(line) errmsg("Line %d is not a stopping point in file \"%s\".\n", line, file) return end + else + errmsg("No source file named %s\n" % file) + return unless confirm("Set breakpoint anyway? (y/n) ") end + unless @state.context errmsg "We are not in a state we can add breakpoints.\n" return end b = Debugger.add_breakpoint file, line, expr