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

junegunn opened this Issue Sep 1, 2014 · 0 comments


None yet
2 participants
Copy link

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"."); require "a"'

> rvm use jruby-1.7.14
> ruby -rpathname -e '$LOAD_PATH.unshift"."); require "a"'
TypeError: can't convert Pathname into String
  require at org/jruby/
  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"."); require "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
You can’t perform that action at this time.