Skip to content

Commit

Permalink
Merge pull request #1464 from ruby/fix-ci
Browse files Browse the repository at this point in the history
Fix CI failure
  • Loading branch information
soutaro committed Aug 24, 2023
2 parents edb7e74 + 7b2d7fa commit ed3ac5b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
5 changes: 1 addition & 4 deletions test/stdlib/Kernel_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def (obj = BasicObject.new).inspect
def test_pp
pp
pp 1
pp 'a', 2
pp 'a', 2

pp Object.new
end
Expand Down Expand Up @@ -704,9 +704,6 @@ def o.divmod(i)
[0.001, 0.001]
end
sleep o

omit_if(RUBY_VERSION < "3.3.0")
sleep nil
end

def test_syscall
Expand Down
20 changes: 19 additions & 1 deletion test/stdlib/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ class Test::Unit::TestCase
prepend TestSkip
end

class Test::Unit::TestCase
module Printer
def setup
STDERR.puts name
super
end
end

# prepend Printer
end

module Spy
def self.wrap(object, method_name)
spy = WrapSpy.new(object: object, method_name: method_name)
Expand Down Expand Up @@ -460,7 +471,7 @@ def initialize(*args)
def to_ary
@args
end
end
end

class ToHash
def initialize(hash = { 'hello' => 'world' })
Expand Down Expand Up @@ -578,6 +589,11 @@ def self.hook
end
end

# def setup
# STDERR.puts name
# super
# end

def hook
self.class.hook
end
Expand All @@ -591,9 +607,11 @@ def setup
null = StringIO.new
@stdout, @stderr = $stdout, $stderr
$stderr = $stdout = null
super
end

def teardown
super
$stderr, $stdout = @stderr, @stdout
end
end
Expand Down

0 comments on commit ed3ac5b

Please sign in to comment.