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

Test suite fails under Ruby 1.9 #2

Closed
bct opened this issue Mar 22, 2011 · 2 comments
Closed

Test suite fails under Ruby 1.9 #2

bct opened this issue Mar 22, 2011 · 2 comments

Comments

@bct
Copy link

bct commented Mar 22, 2011

(After commenting out require 'require_relative':)

$ ruby1.9 test/require_relative_test.rb 

  1) Failure:
test_current_dir_not_in_load_path(RequireRelativeTest) [test/require_relative_test.rb:10]:
Expected "." to be nil.

  2) Error:
test_require_relative(RequireRelativeTest):
LoadError: no such file to load -- /home/bct/projects/require_relative/test/test/foo
    <internal:prelude>:34:in `require'
    <internal:prelude>:34:in `require_relative'
    test/require_relative_test.rb:14:in `test_require_relative'

It's the second one that bugs me most.

@bct
Copy link
Author

bct commented Mar 22, 2011

http://www.ruby-forum.com/topic/148978#659306 appears to describe the behaviour of require_relative in Ruby 1.9:

Is this just a matter of having require search '.' last?

No, because it's relative to the source file doing the require-ing,
and not the current directory.

@steveklabnik
Copy link
Owner

This works now.

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

No branches or pull requests

2 participants