You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Gemfile and gemspec lines with more than one version constraint keep only the first #624
parseGemfileLine and parseGemspec in src/core-open/scanners/ruby-scanner.ts capture a single quoted constraint after the gem name. Ruby allows several:
Confirmed: parseGemfileLine (line 206) and the parseGemspec regex (line 366) in src/core-open/scanners/ruby-scanner.ts each capture one quoted constraint after the name, so gem "rails", ">= 7.0", "< 8" reports only >= 7.0.
Rather than stretching the regex, split the argument list after the gem name into tokens and take quoted strings until the first token that isn't a plain string (require:, group:, platforms: and so on). Join them with , for currentSpec, and keep feeding the first lower-bound constraint into the existing version extraction so drift doesn't change. Cover the require: false case explicitly, since that's the easiest one to break.
Activity
vibgrate-team commentedon Nov 10, 2026
Confirmed:
parseGemfileLine(line 206) and theparseGemspecregex (line 366) insrc/core-open/scanners/ruby-scanner.tseach capture one quoted constraint after the name, sogem "rails", ">= 7.0", "< 8"reports only>= 7.0.Rather than stretching the regex, split the argument list after the gem name into tokens and take quoted strings until the first token that isn't a plain string (
require:,group:,platforms:and so on). Join them with,forcurrentSpec, and keep feeding the first lower-bound constraint into the existing version extraction so drift doesn't change. Cover therequire: falsecase explicitly, since that's the easiest one to break.fix(ruby): keep every quoted gem constraint before a keyword (vibgrat…