diff --git a/lib/solargraph/yard_map.rb b/lib/solargraph/yard_map.rb index 89208a2b..04be84aa 100755 --- a/lib/solargraph/yard_map.rb +++ b/lib/solargraph/yard_map.rb @@ -288,7 +288,7 @@ def spec_for_require path # Avoid loading the spec again if it's going to be skipped anyway return spec if @source_gems.include?(spec.name) # Avoid loading the spec again if it's already the correct version - if @gemset[spec.name] && @gemset[spec.name] != spec.version + if @gemset[spec.name] && spec.version != @gemset[spec.name] begin return Gem::Specification.find_by_name(spec.name, "= #{@gemset[spec.name]}") rescue Gem::LoadError