Skip to content

Commit

Permalink
Conditionally call Module#set_temporary_name
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Giddins <[email protected]>
  • Loading branch information
segiddins committed Oct 22, 2024
1 parent 1c8e855 commit 31160d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/quickdraw/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def load_tests
file_path = @files[i]

Class.new(Quickdraw::Context) do
set_temporary_name "Quickdraw::Context(in #{file_path})"
set_temporary_name "Quickdraw::Context(in #{file_path})" if respond_to?(:set_temporary_name)
define_singleton_method(:run) { run }
class_eval(File.read(file_path), file_path, 1)
end
Expand Down

0 comments on commit 31160d1

Please sign in to comment.