File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,9 +55,14 @@ desc "Unpack the rack gem"
5555task :unpack_gem => "target" do |t |
5656 target = File . expand_path ( t . prerequisites . first )
5757 spec = Gem . loaded_specs [ 'rack' ]
58- if spec . respond_to? ( :cache_file )
59- gem_file = spec . cache_file
60- else
58+ # JRuby <= 1.7.20 does not handle respond_to? with method_missing right
59+ # ... issue with Bundler::StubSpecification wrapping (in bundler 1.10.x)
60+ unless ( gem_file = spec . cache_file rescue nil )
61+ #if defined?(::Bundler) && ::Bundler.const_defined?(:StubSpecification) # since Bundler 1.10.1
62+ # spec = spec.to_spec if spec.is_a?(::Bundler::StubSpecification)
63+ #else
64+ # spec = spec.to_spec if spec.respond_to?(:to_spec)
65+ #end
6166 gem_file = File . join ( spec . base_dir , 'cache' , spec . file_name )
6267 end
6368 unless uptodate? ( "#{ target } /vendor/rack.rb" , [ __FILE__ , gem_file ] )
You can’t perform that action at this time.
0 commit comments