-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate comments? #1054
Comments
I've been able to reproduce, the location in fact seems to be the same, even the position. Seems like it not only happens with that method. I've also tried with slice but probably happens with others 11] pry(main)> instance.methods[:gsub].comments.map(&:location)
=> [#<RBS::Location:7720 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=1816:2, pos=57378...57861, children= source='# <!--'>,
#<RBS::Location:7720 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=1816:2, pos=57378...57861, children= source='# <!--'>,
#<RBS::Location:7720 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=1816:2, pos=57378...57861, children= source='# <!--'>,
#<RBS::Location:7720 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=1816:2, pos=57378...57861, children= source='# <!--'>] [10] pry(main)> instance.methods[:slice].comments.map(&:location)
=> [#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>,
#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>,
#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>,
#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>,
#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>,
#<RBS::Location:8480 buffer=/home/hfarji/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.6.0/core/string.rbs, start=888:2, pos=25452...28393, children= source='# <!--'>] |
Just for reference, I've tried this with the code mentioned at https://github.com/ruby/rbs#library and at least I've been able to reproduce with rbs 2.6.0 in ruby 3.1.2 |
Ok, deduping would make sense. Thanks! |
Following the example:
Did I do something wrong? The 4 comments all seem identical?
The text was updated successfully, but these errors were encountered: