mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Convert ostruct to openstruct
This commit is contained in:
parent
3e6f5ead9e
commit
d722bdcf6e
Notes:
git
2025-01-08 08:12:46 +00:00
2 changed files with 4 additions and 1 deletions
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue