Yes. Because modal means waiting for user interaction and Ruby will wait to execute the code lines after show_modal line (here UI.start_timer) . Therefor a block inside will not happen. User must close the modal window manually or the dialog itself have to send a callback to Ruby.
Then the code execution continues.