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

Pathname object in $LOAD_PATH causes error (1.7.14) #1936

Closed
junegunn opened this issue Sep 1, 2014 · 0 comments
Closed

Pathname object in $LOAD_PATH causes error (1.7.14) #1936

junegunn opened this issue Sep 1, 2014 · 0 comments
Milestone

Comments

@junegunn
Copy link

@junegunn junegunn commented Sep 1, 2014

Since 1.7.14, require throws TypeError when $LOAD_PATH includes Pathname object. I ran into this error while running some legacy code after upgrading JRuby.

> echo 'puts :a' > a.rb

> rvm use jruby-1.7.13
> ruby -rpathname -e '$LOAD_PATH.unshift Pathname.new("."); require "a"'
a

> rvm use jruby-1.7.14
> ruby -rpathname -e '$LOAD_PATH.unshift Pathname.new("."); require "a"'
TypeError: can't convert Pathname into String
  require at org/jruby/RubyKernel.java:1065
  require at /Users/jg/.rvm/rubies/jruby-1.7.14/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
   (root) at -e:1

> rvm use ruby
> ruby -rpathname -e '$LOAD_PATH.unshift Pathname.new("."); require "a"'
a
enebo added a commit that referenced this issue Sep 2, 2014
@enebo enebo added this to the JRuby 1.7.15 milestone Sep 2, 2014
@enebo enebo closed this Sep 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants