File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
spec/ruby/language/regexp Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 7
7
{
8
8
"name" : "regex" ,
9
9
"subdir" : True ,
10
- "version" : "43a4c1b16e2baaa16ed0598fa6fb59408ee71ef2 " ,
10
+ "version" : "bf2c742da013f65f715dad08f58cb6a8eec1eee4 " ,
11
11
"urls" : [
12
12
{"url" : "https://github.com/oracle/graal.git" , "kind" : "git" },
13
13
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots" , "kind" : "binary" },
16
16
{
17
17
"name" : "sulong" ,
18
18
"subdir" : True ,
19
- "version" : "43a4c1b16e2baaa16ed0598fa6fb59408ee71ef2 " ,
19
+ "version" : "bf2c742da013f65f715dad08f58cb6a8eec1eee4 " ,
20
20
"urls" : [
21
21
{"url" : "https://github.com/oracle/graal.git" , "kind" : "git" },
22
22
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots" , "kind" : "binary" },
Original file line number Diff line number Diff line change 25
25
-> { Regexp . new ( "(?<1a>a)" ) } . should raise_error ( RegexpError )
26
26
-> { Regexp . new ( "(?<-a>a)" ) } . should raise_error ( RegexpError )
27
27
end
28
+
29
+ it "ignore capture groups in line comments" do
30
+ /^
31
+ (a) # there is a capture group on this line
32
+ b # there is no capture group on this line (not even here)
33
+ $/x . match ( "ab" ) . to_a . should == [ "ab" , "a" ]
34
+ end
28
35
end
You can’t perform that action at this time.
0 commit comments