summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator
diff options
context:
space:
mode:
authorKenta Murata <mrkn@users.noreply.github.com>2020-10-23 15:26:51 +0900
committerGitHub <noreply@github.com>2020-10-23 15:26:51 +0900
commitf754b422855131111092c0c147d744775cc4793f (patch)
tree1ca57f3b6cedb36549c456a79a57cffce940e6fc /spec/ruby/core/enumerator
parent40bad72f31248c48048249b1d7536e87b4994664 (diff)
numeric.c, range.c: prohibit zero step
* numeric.c: prohibit zero step in Numeric#step * range.c: prohibit zero step in Range#step * Fix ruby-spec [Feature #15573]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3689 Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'spec/ruby/core/enumerator')
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb b/spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb
index 20a5cb6e7b..8b00fd4309 100644
--- a/spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb
+++ b/spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb
@@ -5,11 +5,9 @@ ruby_version_is "2.6" do
it "returns the original value given to step method" do
(1..10).step.step.should == 1
(1..10).step(3).step.should == 3
- (1..10).step(0).step.should == 0
1.step(10).step.should == 1
1.step(10, 3).step.should == 3
- 1.step(10, 0).step.should == 0
end
end
end