aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_arithmetic_sequence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_arithmetic_sequence.rb')
-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)