Skip to content

Commit 835fd51

Browse files
Merge pull request #7537 from rubygems/deivid-rodriguez/vendor_gem-takes-a-block
Fix resolver to properly intersect Arrays of `Gem::Resolver::Activation` objects (cherry picked from commit 6a91218)
1 parent e7269d1 commit 835fd51

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/rubygems/resolver/spec_specification.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,11 @@ def platform
6666
def version
6767
spec.version
6868
end
69+
70+
##
71+
# The hash value for this specification.
72+
73+
def hash
74+
spec.hash
75+
end
6976
end

test/rubygems/helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,12 +1367,12 @@ def v(string)
13671367
#
13681368
# Yields the +specification+ to the block, if given
13691369

1370-
def vendor_gem(name = "a", version = 1)
1370+
def vendor_gem(name = "a", version = 1, &block)
13711371
directory = File.join "vendor", name
13721372

13731373
FileUtils.mkdir_p directory
13741374

1375-
save_gemspec name, version, directory
1375+
save_gemspec name, version, directory, &block
13761376
end
13771377

13781378
##

0 commit comments

Comments
 (0)