Skip to content

Commit b5346f2

Browse files
nicholasdowerXrXr
authored andcommitted
Add a test case for it in a regex.
Co-authored-by: Alan Wu <[email protected]>
1 parent 1f6d845 commit b5346f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/ruby/test_syntax.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,7 @@ def test_it
19541954
assert_equal(6, eval('a = 0; 6.then { begin; nil; rescue; ensure; a = it; end }; a'))
19551955
assert_equal(7, eval('a = 0; 7.then { begin; raise; ensure; a = it; end } rescue a'))
19561956
assert_equal(8, eval('a = 0; 8.then { begin; raise; rescue; ensure; a = it; end }; a'))
1957+
assert_equal(/9/, eval('9.then { /#{it}/o }'))
19571958
end
19581959

19591960
def test_value_expr_in_condition

0 commit comments

Comments
 (0)