mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@fd6eddd
This commit is contained in:
parent
44736a6b7a
commit
95d9fe9538
26 changed files with 501 additions and 84 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue