• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-lang / regex / 2464
93%

Build:
DEFAULT BRANCH: master
Ran 31 Jan 2020 12:08AM UTC
Jobs 1
Files 20
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2464

push

travis-ci-com

BurntSushi
syntax: fix flag scoping issue

This fixes a rather nasty bug where flags set inside a group were being
applies to expressions outside the group. e.g., In the simplest case,
`((?i)a)b)` would match `aB`, even though the case insensitive flag
_shouldn't_ be applied to `b`.

The issue here was that we were actually going out of our way to reset
the flags when a group is popped only _some_ of the time. Namely, when
flags were set via `(?i:a)b` syntax. Instead, flags should be reset to
their previous state _every_ time a group is popped in the translator.

The fix here is pretty simple. When we open a group, if the group itself
does not have any flags, then we simply record the current state of the
flags instead of trying to replace the current flags. Then, when we pop
the group, we are guaranteed to obtain the old flags, at which point, we
reset them.

Fixes #640

3690 of 3979 relevant lines covered (92.74%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
4 2464.4 31 Jan 2020 12:08AM UTC 0
92.74
Travis Job 2464.4
Source Files on build 2464
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #2464
  • ea4009a2 on github
  • Prev Build on master (#2462)
  • Next Build on master (#2468)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc