Skip to content

Commit 584d226

Browse files
committed
WIP
1 parent 2108d8b commit 584d226

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/test_queue/runner/cucumber.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@
44
require 'cucumber/rspec/disable_option_parser'
55
require 'cucumber/cli/main'
66

7-
if defined?(Cucumber::Ast::TreeWalker)
8-
class Cucumber::Ast::TreeWalker
9-
private
10-
11-
def extract_method_name_from(call_stack)
12-
call_stack[0].match(/in `(.*)'/).captures[0]
13-
rescue
14-
+''
15-
end
16-
end
17-
end
18-
197
module Cucumber
208
module Ast
219
class Features
@@ -27,6 +15,18 @@ def to_s
2715
title
2816
end
2917
end
18+
19+
class TreeWalker
20+
private
21+
22+
def extract_method_name_from(call_stack)
23+
if RUBY_VERSION.to_f == 3.4
24+
call_stack[0].match(/in '(.*)'/).captures[0]
25+
else
26+
call_stack[0].match(/in `(.*)'/).captures[0]
27+
end
28+
end
29+
end
3030
end
3131

3232
class Runtime

0 commit comments

Comments
 (0)