From d722bdcf6e6d195faf4ed03bbd8b2c07686a925b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 28 Nov 2024 10:17:15 +0900 Subject: [PATCH] Convert ostruct to openstruct --- spec/bundled_gems.mspec | 1 + spec/default.mspec | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/bundled_gems.mspec b/spec/bundled_gems.mspec index 48f917c809..f7edb34c75 100644 --- a/spec/bundled_gems.mspec +++ b/spec/bundled_gems.mspec @@ -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? diff --git a/spec/default.mspec b/spec/default.mspec index ecd3f3afe9..058835cd10 100644 --- a/spec/default.mspec +++ b/spec/default.mspec @@ -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