Skip to content
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

Remove expanded path #80

Merged
merged 2 commits into from
Jan 4, 2012
Merged

Remove expanded path #80

merged 2 commits into from
Jan 4, 2012

Conversation

luislavena
Copy link
Contributor

Hello,

Thin::ROOT is defined and used to use full paths on both autoload and require.

There is no proven performance improvement on the usage of forced path instead of letting Ruby figure it out.

There is also a downside on performance on Windows (which I'm investigating)

Letting Ruby resolve the path works 99% of the cases, being only when running from source the only scenario that requires special flags:

ruby -Ilib bin/thin

Even rspec adds lib to $LOAD_PATH.

This pull request removes the usage of Thin::ROOT in both autoload and require.

Also ignores build artifacts no matter where they are placed, which seems to correct current ignore rules.

Cheers

Ruby is smart enough to find thin/* with autoload or require.

Forcing a full path into it do not result in better performance, on the
contrary, impact on performance on Windows :-(

'lib' directory is always pushed into $LOAD_PATH when running specs, but you
can manually run bin/thin like this:

  ruby -Ilib bin/thin
@morenocarullo
Copy link

+1

macournoyer added a commit that referenced this pull request Jan 4, 2012
@macournoyer macournoyer merged commit d13183e into macournoyer:master Jan 4, 2012
@macournoyer
Copy link
Owner

Indeed that was dumb. Thanks!

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.

3 participants