Skip to content

Commit

Permalink
Resolve annotations.rb to a real path
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr committed Sep 26, 2022
1 parent 53ab54a commit 775f7e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/solargraph/rails/rails_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ def self.instance
def global(yard_map)
return [] if yard_map.required.empty?

ann = File.read(File.dirname(__FILE__) + '/annotations.rb')
source = Solargraph::Source.load_string(ann, 'annotations.rb')
path = File.dirname(__FILE__) + '/annotations.rb'
ann = File.read(path)
source = Solargraph::Source.load_string(ann, path)
map = Solargraph::SourceMap.map(source)

Solargraph.logger.debug(
Expand Down

0 comments on commit 775f7e6

Please sign in to comment.