Quantcast
Channel: Ruby Issue Tracking System: shevegen (Robert A. Heiler)
Viewing all articles
Browse latest Browse all 100

Ruby master - Feature #16848: Allow callables in $LOAD_PATH

$
0
0

This was recently discussed:

https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20200514Japan.md

ko1 will reply.

I have no particular opinion per se on this suggestion. But one thing made me
curious:

require "foo" # load my_app/foo.rb
require "bar" # load /gems/bar/bar.rb
require "baz" # load /gems/baz/baz.rb
require "qux" # load /stdlib/qux.rb

This would be quite nice in that we do not have to provide a specific path to
a .rb file. This could also help if you relocate files, from one path to
another - if you specify the hardcoded path, if that is changed, you have
to modify all links that point to that .rb file.

My totally unfinished idea is to propose being able to omit all require
statements. :)

Perhaps only make it limited to gem releases where the ruby user no longer
has to supply a full path, and then update it if it changes. Something
like an API for requires that allows us to be unspecific.

I understand that this is not what byroot suggested, so I should make a
separate issue suggestion. But I wanted to mention it because it sort of
taps into a related idea - make it easier to handle require of files.

This is something I have to do almost daily when I write ruby code -
I have to find where code is, then load that code and make sure all
require lines are correct. This is a bit cumbersome.


Viewing all articles
Browse latest Browse all 100

Trending Articles