summaryrefslogtreecommitdiff
path: root/lib/bundler/match_metadata.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-22 11:52:51 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-23 10:45:57 +0900
commitf69244cee8c01d82e94d38032c82be684f37808a (patch)
tree40dc0819f3a987867788fe1f752f8088ff209004 /lib/bundler/match_metadata.rb
parent4790d0accdb745f9d8e605fd42eab712e4ebf834 (diff)
Merge rubygems/bundler HEAD
Pick from https://github.com/rubygems/rubygems/commit/6b3a5a9ab0453463381a8164efb6298ea9eb776f
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6268
Diffstat (limited to 'lib/bundler/match_metadata.rb')
-rw-r--r--lib/bundler/match_metadata.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/bundler/match_metadata.rb b/lib/bundler/match_metadata.rb
new file mode 100644
index 0000000000..499036ca93
--- /dev/null
+++ b/lib/bundler/match_metadata.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Bundler
+ module MatchMetadata
+ def matches_current_ruby?
+ @required_ruby_version.satisfied_by?(Gem.ruby_version)
+ end
+
+ def matches_current_rubygems?
+ @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
+ end
+ end
+end