summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-26 10:16:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-26 10:16:32 +0900
commit0686e4181d04dd911316a227753ceaa96d8c6533 (patch)
treefd65ce9eee3f5d69608afba1aa64d7a2b01bf218 /test/csv
parent672213ef1ca2b71312084057e27580b340438796 (diff)
Fixed for older versions
Fix up 66d1900423e6fb9774c2fe72dba8c2968b54d7ab, `RubyVM::MJIT` is available since ruby 2.6.
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/parse/test_general.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/csv/parse/test_general.rb b/test/csv/parse/test_general.rb
index 4da1775..52b0cab 100644
--- a/test/csv/parse/test_general.rb
+++ b/test/csv/parse/test_general.rb
@@ -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")