Convert ostruct to openstruct

This commit is contained in:
Hiroshi SHIBATA 2024-11-28 10:17:15 +09:00
parent 3e6f5ead9e
commit d722bdcf6e
Notes: git 2025-01-08 08:12:46 +00:00
2 changed files with 4 additions and 1 deletions

View file

@ -4,6 +4,7 @@ class MSpecScript
test_bundled_gems = get(:stdlibs).to_a & get(:bundled_gems).to_a
unless ENV["BUNDLED_GEMS"].nil? || ENV["BUNDLED_GEMS"].empty?
test_bundled_gems = ENV["BUNDLED_GEMS"].split(",").map do |gem|
gem = "openstruct" if gem == "ostruct"
test_bundled_gems.find{|test_gem| test_gem.include?(gem) }
end.compact
exit if test_bundled_gems.empty?

View file

@ -34,7 +34,9 @@ class MSpecScript
# Disable to run for bundled gems in test-spec
set :bundled_gems, (File.readlines("#{srcdir}/gems/bundled_gems").map do |line|
next if /^\s*(?:#|$)/ =~ line
"#{srcdir}/spec/ruby/library/" + line.split.first
gem = line.split.first
gem = "openstruct" if gem == "ostruct"
"#{srcdir}/spec/ruby/library/#{gem}"
end.compact)
set :stdlibs, Dir.glob("#{srcdir}/spec/ruby/library/*")
set :library, get(:stdlibs).to_a - get(:bundled_gems).to_a