Skip to content

Commit

Permalink
return ruby_version as raw string.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Oct 27, 2024
1 parent 10c3917 commit 2603346
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bundler/lib/dependabot/bundler/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.detected_bundler_version(lockfile)
params(
gemfile: T.nilable(Dependabot::DependencyFile),
lockfile: T.nilable(Dependabot::DependencyFile)
).returns(Gem::Version)
).returns(String)
end
def self.ruby_version(gemfile, lockfile)
ruby_version = ruby_version_from_ruby_version_file
Expand All @@ -49,9 +49,10 @@ def self.ruby_version(gemfile, lockfile)

ruby_version = ruby_version_from_definition(gemfile, lockfile) if ruby_version.nil?

# If we still don't have a Ruby version, the version dependabot is running on is used
ruby_version = RUBY_VERSION if ruby_version.nil?

Gem::Version.new(ruby_version)
ruby_version
end

sig do
Expand Down

0 comments on commit 2603346

Please sign in to comment.