1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2021-03-27 13:02:41 +01:00
parent 44736a6b7a
commit 95d9fe9538
26 changed files with 501 additions and 84 deletions

View file

@ -25,4 +25,11 @@ describe "Regexps with grouping" do
-> { Regexp.new("(?<1a>a)") }.should raise_error(RegexpError)
-> { Regexp.new("(?<-a>a)") }.should raise_error(RegexpError)
end
it "ignore capture groups in line comments" do
/^
(a) # there is a capture group on this line
b # there is no capture group on this line (not even here)
$/x.match("ab").to_a.should == [ "ab", "a" ]
end
end