summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-07 19:04:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-07 19:04:28 +0000
commitba6c7348472f936e852285b11f71e858d2ed4f35 (patch)
treee709e5482cf05035851dfeb83a4348c99ac28275 /test
parent622a2af0ba13f71c4d9adac1efa97b3aa63bce76 (diff)
numeric.c: no extra checks
* numeric.c (NUM_STEP_SCAN_ARGS): remove extra class checks, which cause the incompatibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb2
-rw-r--r--test/ruby/test_numeric.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index f011c2b062..127c8c6f92 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -558,7 +558,7 @@ class TestFloat < Test::Unit::TestCase
end
def test_num2dbl
- assert_raise(TypeError) do
+ assert_raise(ArgumentError) do
1.0.step(2.0, "0.5") {}
end
assert_raise(TypeError) do
diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb
index 4e7aef2777..e82269165b 100644
--- a/test/ruby/test_numeric.rb
+++ b/test/ruby/test_numeric.rb
@@ -227,8 +227,8 @@ class TestNumeric < Test::Unit::TestCase
assert_raise(ArgumentError) { 1.step(10, 1, 0).size }
assert_raise(ArgumentError) { 1.step(10, 0) { } }
assert_raise(ArgumentError) { 1.step(10, 0).size }
- assert_raise(TypeError) { 1.step(10, "1") { } }
- assert_raise(TypeError) { 1.step(10, "1").size }
+ assert_raise(ArgumentError) { 1.step(10, "1") { } }
+ assert_raise(ArgumentError) { 1.step(10, "1").size }
assert_raise(TypeError) { 1.step(10, nil) { } }
assert_raise(TypeError) { 1.step(10, nil).size }
assert_nothing_raised { 1.step(by: 0, to: nil) }