spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb fails on case-insensitive filesystem #758

dmarcotte opened this Issue May 23, 2013 · 2 comments


None yet

4 participants


(Apologies in advance if this is some quirk specific to my machine; this is not a new test, so that's sort of the outcome I'm expecting)

ant test runs clean for me, but only if I comment out JRUBY-5811: jruby 1.9 fails to load irb works. It fails for me locally (OSX 10.7.5), complaining about a load error on the upcased filename:

$ bin/jruby spec/mspec/bin/mspec spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb
jruby 1.7.5.dev (1.9.3p392) 2013-05-21 f03f754 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_21-b12 [darwin-x86_64]

JRUBY-5811: jruby 1.9 fails to load irb works ERROR
LoadError: no such file to load -- /VAR/FOLDERS/M1/9FK3ZT7N5791KWBP7FMJ_QVHH55T8G/T/DUMMY20130523-98892-1SRZQI3.RB
org/jruby/RubyKernel.java:1054:in `require'
/Users/daniel.marcotte/workspace/code/jruby/lib/ruby/shared/rubygems/custom_require.rb:36:in `require'
/Users/daniel.marcotte/workspace/code/jruby/spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb:19:in `(root)'
org/jruby/RubyBasicObject.java:1531:in `instance_eval'
org/jruby/RubyEnumerable.java:1343:in `all?'
org/jruby/RubyFixnum.java:280:in `times'
org/jruby/RubyArray.java:1617:in `each'
/Users/daniel.marcotte/workspace/code/jruby/spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb:3:in `(root)'
org/jruby/RubyKernel.java:1073:in `load'
org/jruby/RubyBasicObject.java:1531:in `instance_eval'
org/jruby/RubyArray.java:1617:in `each'

Finished in 0.377000 seconds

1 file, 1 example, 0 expectations, 0 failures, 1 error

Interestingly, my 1.9.3 agrees that this should fail:

$ ruby spec/mspec/bin/mspec spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin11.4.2]

JRUBY-5811: jruby 1.9 fails to load irb works ERROR
LoadError: cannot load such file -- /VAR/FOLDERS/M1/9FK3ZT7N5791KWBP7FMJ_QVHH55T8G/T/DUMMY20130523-87265-1VUB9BH.RB
/Users/daniel.marcotte/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/daniel.marcotte/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/daniel.marcotte/workspace/code/jruby/spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb:19:in `block (2 levels) in <top (required)>'

Anyone else seeing this? (Would have to be Mac or Windows, this code path is skipped on case sensitive file systems)

@nahi nahi was assigned Jun 17, 2013
atambo commented Jun 23, 2013

Fails for me as well on OSX 10.8.4.

./bin/jruby -S rspec spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb


  1) JRUBY-5811: jruby 1.9 fails to load irb works
     Failure/Error: (require @file.path.upcase).should == false
       no such file to load -- /VAR/FOLDERS/NC/RJZNLX0N6JG85LYLZLT2J6_40000GN/T/DUMMY20130623-31069-1L8UMV6.RB
     # ./spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb:19:in `(root)'

Finished in 0.075 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb:13 # JRUBY-5811: jruby 1.9 fails to load irb works
@BanzaiMan BanzaiMan closed this Sep 3, 2013
@BanzaiMan BanzaiMan was assigned Sep 3, 2013
@BanzaiMan BanzaiMan reopened this Sep 3, 2013

I tracked this down a bit further. See commits leading up to https://github.com/jruby/jruby/commits/7aba1c2a4705bd12447bf9848015e99488041bb7/src/org/jruby/util/collections/StringArraySet.java (in particular 65c07ea) and notice that case-insensitive search of LOADED_FEATURES scanning was abandoned.

So this spec is no longer valid.

@BanzaiMan BanzaiMan added a commit that closed this issue Sep 3, 2013
@BanzaiMan BanzaiMan Remove JRUBY-5811 regression spec
Case-insensitive `LOADED_FEATURES` scanning is abandoned (65c07ea).

Fixes #758.
@BanzaiMan BanzaiMan closed this in bc3a712 Sep 3, 2013
@mbj mbj pushed a commit to mbj/jruby that referenced this issue Nov 8, 2013
@BanzaiMan BanzaiMan Fix regression spec on case-insensitive fs [skip ci]
When the file does not exist, it should raise LoadError.

Fixes jruby#758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment