From: Nobuyoshi Nakada Date: 2013-08-17T21:00:34+09:00 Subject: [ruby-core:56686] Re: [ruby-trunk - Feature #8781] Use require_relative() instead of require() if possible (13/08/17 13:13), Aaron Patterson wrote: > First, it *is* a real use case (as in, people actually use it in *real* > projects): > > [aaron@higgins ruby (trunk)]$ git grep require_relative | grep '\.\.' | wc -l > 45 > [aaron@higgins ruby (trunk)]$ It's only in test directory, and almost is test/ruby/envutil.rb. I agree that require_relative fits something but may not other. That example tells us that envutil.rb shouldn't be bound in test/ruby. > Again, "foo.rb" is completely independent of the filesystem. The files > it depends on did not change, so it did not have to change. > > I am uncertain how to make the coupling between "require_relative" and > the filesystem more clear than this. But I don't think your point enough to prohibit to use require_relative. Why move a file but not edit it? An author can use it when one thinks it is useful, it's the author's choice. This proposal is just a proposal, but not mandatory. -- Nobu Nakada