mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed for older versions
Fix up 66d1900423
, `RubyVM::MJIT` is
available since ruby 2.6.
This commit is contained in:
parent
672213ef1c
commit
0686e4181d
1 changed files with 4 additions and 1 deletions
|
@ -246,7 +246,10 @@ line,5,jkl
|
|||
private
|
||||
def assert_parse_errors_out(data, **options)
|
||||
assert_raise(CSV::MalformedCSVError) do
|
||||
timeout = (RubyVM::MJIT.enabled? ? 5 : 0.2) # for --jit-wait
|
||||
timeout = 0.2
|
||||
if defined?(RubyVM::MJIT.enabled?) and RubyVM::MJIT.enabled?
|
||||
timeout = 5 # for --jit-wait
|
||||
end
|
||||
Timeout.timeout(timeout) do
|
||||
CSV.parse(data, **options)
|
||||
fail("Parse didn't error out")
|
||||
|
|
Loading…
Add table
Reference in a new issue