diff --git a/scenario/variable/gvar.rb b/scenario/variable/gvar.rb index 83fe2d2b..16ce1121 100644 --- a/scenario/variable/gvar.rb +++ b/scenario/variable/gvar.rb @@ -11,19 +11,9 @@ def baz $VERBOSE end -def nth_group_of_last_match - [$1, $2, $3, $4, $5, $6, $7, $8, $9, $10] -end - -def back_reference - $& -end - ## assert class Object def foo: -> String def bar: -> String def baz: -> bool? - def nth_group_of_last_match: -> [String, String, String, String, String, String, String, String, String, String] - def back_reference: -> String end diff --git a/scenario/variable/special-vars.rb b/scenario/variable/special-vars.rb new file mode 100644 index 00000000..01f6dcc8 --- /dev/null +++ b/scenario/variable/special-vars.rb @@ -0,0 +1,14 @@ +## update +def nth_group_of_last_match + [$1, $2, $3, $4, $5, $6, $7, $8, $9, $10] +end + +def back_reference + $& +end + +## assert +class Object + def nth_group_of_last_match: -> [String, String, String, String, String, String, String, String, String, String] + def back_reference: -> String +end