Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test #1972

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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