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
2 changes: 1 addition & 1 deletion lib/error_highlight/core_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module CoreExt
_, _, snippet, highlight = ErrorHighlight.formatter.message_for(spot).lines
out += "\n | #{ snippet } #{ highlight }"
else
out += "\n (cannot highlight method definition; try Ruby 3.5 or later)"
out += "\n (cannot highlight method definition; try Ruby 4.0 or later)"
end
end
ret << "\n" + out if out
Expand Down
18 changes: 9 additions & 9 deletions test/test_error_highlight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ def test_wrong_number_of_arguments_for_method
MethodDefLocationSupported ?
"| def wrong_number_of_arguments_test(x, y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1494,7 +1494,7 @@ def test_missing_keyword
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1515,7 +1515,7 @@ def test_missing_keywords # multiple missing keywords
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1536,7 +1536,7 @@ def test_unknown_keyword
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1557,7 +1557,7 @@ def test_unknown_keywords
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand Down Expand Up @@ -1587,7 +1587,7 @@ def test_wrong_number_of_arguments_for_method2
MethodDefLocationSupported ?
"| def wrong_number_of_arguments_test2(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1609,7 +1609,7 @@ def test_wrong_number_of_arguments_for_lambda_literal
MethodDefLocationSupported ?
"| v = -> {}
^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1631,7 +1631,7 @@ def test_wrong_number_of_arguments_for_lambda_method
MethodDefLocationSupported ?
"| v = lambda { }
^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1657,7 +1657,7 @@ def test_wrong_number_of_arguments_for_define_method
MethodDefLocationSupported ?
"| define_method :define_method_test do |x, y|
^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand Down