# File karel/karel_window.rb, line 119 def cursor(which) # use "dot" or "X_cursor" or "right_side" or "top_side" begin @canvas.cursor which # Set a new cursor while the passed block executes @canvas.update # Make sure it updates the screen # yield # Call the associated block # ensure # @canvas.cursor "" # Back to original # @canvas.update end end