Skip to content
Closed
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
6 changes: 3 additions & 3 deletions test/ruby/test_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_remove_instance_variable
assert_equal(false, o.instance_variable_defined?(:@foo))
end

def test_convert_type
def test_convert_string
o = Object.new
def o.to_s; 1; end
assert_raise(TypeError) { String(o) }
Expand All @@ -187,7 +187,7 @@ def o.respond_to?(*) false; end
assert_raise(TypeError) { String(o) }
end

def test_check_convert_type
def test_convert_array
o = Object.new
def o.to_a; 1; end
assert_raise(TypeError) { Array(o) }
Expand All @@ -210,7 +210,7 @@ def o.to_hash; 9; end
assert_raise(TypeError) { Hash(o) }
end

def test_to_integer
def test_convert_integer
o = Object.new
def o.to_i; nil; end
assert_raise(TypeError) { Integer(o) }
Expand Down