Skip to content
Merged
Show file tree
Hide file tree
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: 4 additions & 2 deletions test/stdlib/Method_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ def test_receiver
end

def test_source_location
assert_send_type '() -> [String, Integer]',
METHOD, :source_location
if_ruby(..."4.1") do
assert_send_type '() -> [String, Integer]',
METHOD, :source_location
end
assert_send_type '() -> nil',
method(:__id__), :source_location
end
Expand Down
6 changes: 4 additions & 2 deletions test/stdlib/Proc_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ def test_parameters
end

def test_source_location
assert_send_type '() -> [String, Integer]',
proc{}, :source_location
if_ruby(..."4.1") do
assert_send_type '() -> [String, Integer]',
proc{}, :source_location
end
assert_send_type '() -> nil',
Proc.new(&Kernel.method(:print)), :source_location
end
Expand Down
10 changes: 6 additions & 4 deletions test/stdlib/UnboundMethod_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ def test_parameters
end

def test_source_location
assert_send_type '() -> [String, Integer]?',
UMETH, :source_location
assert_send_type '() -> [String, Integer]?',
ParamMeths.instance_method(:leading_optional), :source_location
if_ruby(..."4.1") do
assert_send_type '() -> [String, Integer]?',
UMETH, :source_location
assert_send_type '() -> [String, Integer]?',
ParamMeths.instance_method(:leading_optional), :source_location
end
end

def test_super_method
Expand Down