Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Rubygems 2.6.2 Calls undefined method size on Bundler::SpecSet #4368

Closed
danielsdeleo opened this issue Mar 14, 2016 · 1 comment
Closed

Rubygems 2.6.2 Calls undefined method size on Bundler::SpecSet #4368

danielsdeleo opened this issue Mar 14, 2016 · 1 comment

Comments

@danielsdeleo
Copy link
Contributor

I have some code that does Gem::Specification.find_by_name(@gem_name_for_base_dir). When I run this with rubygems 2.6.2, some code internal to rubygems calls #size on a Bundler::SpecSet object, resulting in

NoMethodError: undefined method `size' for #<Bundler::SpecSet:0x007f879baa2d08>
 /Users/ddeleo/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:310:in `to_specs'
 /Users/ddeleo/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:330:in `to_spec'
 /Users/ddeleo/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1028:in `find_by_name'

(I've trimmed the rest of the stack trace as I think it's not relevant to you).

I noticed that Bundler::SpecSet does define #length, and aliasing this method as size seems to resolve my issue.

danielsdeleo added a commit to chef-boneyard/chef-dk that referenced this issue Mar 14, 2016
danielsdeleo added a commit to chef-boneyard/chef-dk that referenced this issue Mar 14, 2016
danielsdeleo added a commit to chef-boneyard/chef-dk that referenced this issue Mar 14, 2016
homu added a commit that referenced this issue Mar 16, 2016
…c-set, r=segiddins

Add alias `Bundler::SpecSet#size` for `Bundler::SpecSet#length`

- Closes #4368
homu added a commit that referenced this issue Mar 16, 2016
…c-set, r=segiddins

Add alias `Bundler::SpecSet#size` for `Bundler::SpecSet#length`

- Closes #4368
homu added a commit that referenced this issue Mar 22, 2016
…c-set, r=segiddins

Add alias `Bundler::SpecSet#size` for `Bundler::SpecSet#length`

- Closes #4368
charlesjohnson pushed a commit to chef-boneyard/chef-dk that referenced this issue May 5, 2016
@PierreR
Copy link

PierreR commented Aug 31, 2016

Could the fix be backported in 1.12.x ? If I am not mistaken, this fix is still not available on any stable release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants