Skip to content

Commit 1fdfa90

Browse files
authored
Fix compatibility with rubygems 3.6 (#7)
Signed-off-by: Samuel Giddins <[email protected]>
1 parent 084690f commit 1fdfa90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/support/request_helpers.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module SpecificationToYamlNormalization
1717
class CoderWrapper < SimpleDelegator
1818
def add(key, value)
1919
value = "3.5.11" if key == "rubygems_version"
20+
value = nil if key == "original_platform" && value == ""
2021
return if value.nil?
2122

2223
super
@@ -68,7 +69,7 @@ def build_gem(name, version, platform: nil)
6869
end
6970
yield spec if block_given?
7071

71-
spec.singleton_class.prepend(SpecificationToYamlNormalization) if Gem.rubygems_version < Gem::Version.new("3.6.0")
72+
spec.singleton_class.prepend(SpecificationToYamlNormalization)
7273

7374
package = Gem::Package.new(StringIO.new.binmode)
7475
package.build_time = Time.utc(1970)

0 commit comments

Comments
 (0)