Browse Source

Fix a minor oversight in "ruby-standard-libs"

We should always remove "mathn" if our effective Ruby version is 2.5+.

See https://github.com/docker-library/official-images/pull/4392
Tianon Gravi 7 năm trước cách đây
mục cha
commit
db5d5eadb9
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      test/tests/ruby-standard-libs/container.rb

+ 5 - 5
test/tests/ruby-standard-libs/container.rb

@@ -103,11 +103,11 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
 	stdlib.delete('mkmf')
 	stdlib.delete('objspace')
 	stdlib.delete('sdbm')
-else
-	require 'rubygems/version'
-	if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.5')
-		stdlib.delete('mathn')
-	end
+end
+
+require 'rubygems/version'
+if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.5')
+	stdlib.delete('mathn')
 end
 
 result = 'ok'