From: "Jimmy C." Date: 2010-12-28T14:19:39+09:00 Subject: Re: to_lang: my first gem, looking for feedback Aaron Patterson wrote in post #970994: > When you use `File.expand_path`, you're *forcing* that file to be in a > place relative to this file. That may seem OK, but what you're really > saying is "I do not want ruby to consult the $LOAD_PATH when requiring". > > Where this really becomes a hindrance is if someone (even yourself) want > to provide an alternate implementation of say "to_lang/connector", you > could just change the -I flags and provide the correct file. But with > the `expand_path` form, you've prevented any hope of doing that. I notice you only changed a couple usages of `File.expand_path`, but left others alone. Is it somehow correct to use them in these other places (e.g. string_methods.rb and connector_spec.rb) or were you just leaving it for me to clean up the rest? I'm not sure how else I'd do it in the remaining cases, since the specs are not in the load path and string_methods.rb is already inside "lib/to_lang" which makes me think it'd end up attempting to load "lib/to_lang/to_lang/codemap.rb" instead of "lib/to_lang/codemap.rb". I'm probably just not fully grasping how the load path works. Your other notes were very helpful and I have merged your commits into my master. Thanks a bunch for taking the time to do this. :) -- Posted via http://www.ruby-forum.com/.