Module: Bundler::GemHelpers
- Included in:
- Definition, MatchPlatform, Resolver::SpecGroup
- Defined in:
- lib/bundler/rubygems_ext.rb
Constant Summary collapse
- GENERIC_CACHE =
{}
- GENERICS =
[ Gem::Platform::JAVA, Gem::Platform::MSWIN, Gem::Platform::MINGW, Gem::Platform::RUBY ]
Instance Method Summary collapse
Instance Method Details
#generic(p) ⇒ Object
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/bundler/rubygems_ext.rb', line 210 def generic(p) return p if p == Gem::Platform::RUBY GENERIC_CACHE[p] ||= begin found = GENERICS.find do |p2| p2.is_a?(Gem::Platform) && p.os == p2.os end found || Gem::Platform::RUBY end end |