From 4a43bc23e5822cb5359d2ed194ceccf8b2bad035 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 29 Jul 2017 11:38:46 +0200 Subject: [PATCH] Bugfix: breakpoints were not effective sometimes Reason: when a page was opened in the macro IDE, the file to ID cache inside the Ruby interpreter did not get updated. Hence there was no link between breakpoint and page and the breakpoint was ignored. --- src/rba/rba.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rba/rba.cc b/src/rba/rba.cc index 07d19fdf1..123682eeb 100644 --- a/src/rba/rba.cc +++ b/src/rba/rba.cc @@ -1904,12 +1904,14 @@ RubyInterpreter::load_file (const std::string &filename_utf8) void RubyInterpreter::eval_string (const char *expr, const char *file, int line, int context) { + d->file_id_map.clear (); rba_eval_string_in_context (expr, file, line, context); } tl::Variant RubyInterpreter::eval_expr (const char *expr, const char *file, int line, int context) { + d->file_id_map.clear (); VALUE res = rba_eval_string_in_context (expr, file, line, context); if (res != Qnil) { return ruby2c (res); @@ -1921,6 +1923,7 @@ RubyInterpreter::eval_expr (const char *expr, const char *file, int line, int co void RubyInterpreter::eval_string_and_print (const char *expr, const char *file, int line, int context) { + d->file_id_map.clear (); VALUE res = rba_eval_string_in_context (expr, file, line, context); if (current_console () && res != Qnil) { VALUE res_s = rba_safe_obj_as_string (res);