diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-27 08:56:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 08:56:00 +0900 |
commit | 9736cb890bb80924e7d1f3189232bfe60519bd29 (patch) | |
tree | 14a239c4cdbf38a34161d6287b627c6542294232 /lib/bundler/source/git.rb | |
parent | 1f877fa238a839dcb77fb88158ea912a43cbf564 (diff) |
Check if `Kernel#untaint` is defined instead of version comparison
Probably `RUBY_VERSION` seems overwritten somewhere in the tests.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5349
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index a41a2f23e9..35ae6329c7 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -336,7 +336,7 @@ module Bundler def load_gemspec(file) stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent) - stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" } + stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap{|x| x.untaint if Kernel.method_defined?(:untaint) } StubSpecification.from_stub(stub) end |