Skip to content

Commit

Permalink
Merge pull request #1972 from ruby/fix-test
Browse files Browse the repository at this point in the history
Fix test
  • Loading branch information
soutaro committed Aug 22, 2024
2 parents ce7f109 + af5d216 commit afc1c51
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/range.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class Range[out Elem] < Object
# Related: Range#step.
#
def %: (Numeric | int n) -> Enumerator[Elem, self]
| (Numeric | int n) { (Elem element) -> void } -> self
| (Numeric | int n) { (Elem element) -> void } -> self

# <!--
# rdoc-file=range.c
Expand Down
10 changes: 7 additions & 3 deletions test/stdlib/Range_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def test_min

def test_percent
(1..10).%(2)
('A'...'Z').%(2) { |s| s.downcase }
if_ruby(..."3.4.0") do
('A'...'Z').%(2) { |s| s.downcase }
end
end

def test_size
Expand All @@ -108,8 +110,10 @@ def test_size
def test_step
(1..10).step
(1..10).step(2)
('A'...'Z').step { |s| s.downcase }
('A'...'Z').step(2) { |s| s.downcase }
if_ruby(..."3.4.0") do
('A'...'Z').step { |s| s.downcase }
('A'...'Z').step(2) { |s| s.downcase }
end
end

def test_to_s
Expand Down
2 changes: 2 additions & 0 deletions test/stdlib/tempfile/TempfileRemover_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require_relative "../test_helper"
require 'tempfile'

return unless defined?(Tempfile::Remover)

class TempfileRemoverSingletonTest < Test::Unit::TestCase
include TestHelper

Expand Down

0 comments on commit afc1c51

Please sign in to comment.