summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 13:18:08 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 13:18:08 +0000
commit25a5227ab188b940d8bbc291bf4c9d62e5d63163 (patch)
treec810b3da6411eb3fc8c9fc99dc238f8198413844 /test
parented4e38c4b0cddd446b13fe95e23bda4c6a97086e (diff)
enumerator.c: undef new and allocate of ArithmeticSequence
Undefine new and allocate methods of Enumerator::ArithmeticSequence. [ruby-core:82816] [Feature #13904] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_arithmetic_sequence.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_arithmetic_sequence.rb b/test/ruby/test_arithmetic_sequence.rb
index fe1af362f4..fcabc8a8c7 100644
--- a/test/ruby/test_arithmetic_sequence.rb
+++ b/test/ruby/test_arithmetic_sequence.rb
@@ -2,6 +2,14 @@
require 'test/unit'
class TestArithmeticSequence < Test::Unit::TestCase
+ def test_new
+ assert_raise(NoMethodError) { Enumerator::ArithmeticSequence.new }
+ end
+
+ def test_allocate
+ assert_raise(TypeError) { Enumerator::ArithmeticSequence.allocate }
+ end
+
def test_begin
assert_equal(1, 1.step.begin)
assert_equal(1, 1.step(10).begin)