Make benchmark exapmles as optional

This commit is contained in:
Hiroshi SHIBATA 2025-01-09 13:27:43 +09:00
parent 3a1414a70b
commit 1089282acc
Notes: git 2025-01-10 01:20:02 +00:00
2 changed files with 5 additions and 2 deletions

View File

@ -235,5 +235,5 @@ module SyntaxSuggest
end_is_missing_here
EOM
end
end
end if defined?(::Benchmark)
end

View File

@ -3,7 +3,10 @@
require "bundler/setup"
require "syntax_suggest/api"
require "benchmark"
begin
require "benchmark"
rescue LoadError
end
require "tempfile"
RSpec.configure do |config|