Kernel.load and Kernel.require can't handle paths with ~/ and ~username/
------------------------------------------------------------------------
Key: JRUBY-2361
URL: http://jira.codehaus.org/browse/JRUBY-2361
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1
Environment: Latest JRuby 1.1
Reporter: Vladimir Sizikov
Assignee: Vladimir Sizikov
Fix For: JRuby 1.1.1
Three new rubyspecs for Kernel's load and require has just been added, and they
fail on JRuby.
Basically, things like:
require '~/blah.rb'
load '~/blah.rb'
load '~vvs/blah.rb'
just don't work in JRuby (but work fine in MRI 1.8.6).
{noformat}
#>bin/mspec ci -t j -X /opt/work/jruby.git/test/spec_excludes
spec/ruby/1.8/core/kernel/
....................................................................................................
..................................E.................................................................
............................EE.........................................../bin/sh:
sad: not found
.....................
1)
Shell expansion in Kernel#load expands a preceding ~/ to the user's home
directory to use as path ER
ROR
No such file to load -- ~/load_spec_1.rb
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/load_spec.rb:226:in `load'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/load_spec.rb:226:in
`/opt/work/rbx.git/./spec/ruby/1.8
/core/kernel/load_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/load_spec.rb:207:in
`/opt/work/rbx.git/./spec/ruby/1.8
/core/kernel/load_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/load_spec.rb:37:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:65:in `main'
mspec/bin/mspec-ci:71
2)
Shell expansion in Kernel#require expands a preceding ~/ to the user's home
directory for building t
he path to search ERROR
no such file to load -- ~/require_spec_1
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:266:in `require'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:266:in
`/opt/work/rbx.git/./spec/ruby/
1.8/core/kernel/require_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:247:in
`/opt/work/rbx.git/./spec/ruby/
1.8/core/kernel/require_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:37:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:65:in `main'
mspec/bin/mspec-ci:71
3)
Shell expansion in Kernel#require adds the path to $LOADED_FEATURES ERROR
no such file to load -- ~/require_spec_1
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:272:in `require'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:272:in
`/opt/work/rbx.git/./spec/ruby/
1.8/core/kernel/require_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:247:in
`/opt/work/rbx.git/./spec/ruby/
1.8/core/kernel/require_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/kernel/require_spec.rb:37:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:65:in `main'
mspec/bin/mspec-ci:71
Finished in 2.245000 seconds
{noformat}
Will fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email