Skip to content

Conversation

BuonOmo
Copy link
Contributor

@BuonOmo BuonOmo commented Jun 26, 2021

Fixes #814

(thanks for the great gem ❤️)


In the process of doing this PR I bumped on a dev issue. I was running tests like ruby test/rdoc/test_rdoc_ri_driver.rb --name=test_ancestors_of_chained_inclusion and it was loading the wrong rdoc version.

I tend to think that is not the developer responsibility, but rather the gem to always internally point to relative resources, make sure we do not load anything coming from somewhere else.

Hence I started a patch, but it is a bit long and I did want to keep this PR simple. I could however open another one with only relative paths for internal resources. Please, tell me if you'd be ready to merge something like that 🙂 (e.g: require_relative and autoload __dir__ + path)

Fixes #814

Signed-off-by: Ulysse Buonomo <[email protected]>
@aycabta
Copy link
Member

aycabta commented Jun 30, 2021

Thanks for the patch and kind consideration.

First of all, this is a great Pull Request. I'll merge it.

Next, about tests, I always make it clear where to load files from, like ruby -Ilib -Itest test/rdoc/test_rdoc_ri_driver.rb. At other times, I do rake test. However, if it makes explicit specification unnecessary, I think that's better. I'm waiting for another Pull Request.

@aycabta aycabta merged commit 9872c4b into ruby:master Jun 30, 2021
nobu pushed a commit to nobu/rdoc that referenced this pull request Sep 12, 2021
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at ruby#817.

Signed-off-by: Ulysse Buonomo <[email protected]>
nobu added a commit that referenced this pull request Feb 10, 2022
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at #817.

Signed-off-by: Ulysse Buonomo <[email protected]>

Co-authored-by: Nobuyoshi Nakada <[email protected]>
matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 12, 2022
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at ruby/rdoc#817.

Signed-off-by: Ulysse Buonomo <[email protected]>

ruby/rdoc@aa41bd48eb

Co-authored-by: Nobuyoshi Nakada <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug on multiple inclusion for classes

2 participants