[ruby/error_highlight] Replace Ruby 3.5 with Ruby 4.0

This commit updates the Ruby version to follow the commit in Ruby master branch.

6d81969b47

https://github.com/ruby/error_highlight/commit/dcecf68d75
This commit is contained in:
Yasuo Honda 2025-11-11 21:37:56 +09:00 committed by Hiroshi SHIBATA
parent c6997ddf3e
commit da114dfe0b
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
2 changed files with 10 additions and 10 deletions

View File

@ -24,7 +24,7 @@ module ErrorHighlight
_, _, 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

View File

@ -1468,7 +1468,7 @@ wrong number of arguments (given 1, expected 2) (ArgumentError)
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
@ -1494,7 +1494,7 @@ missing keyword: :kw3 (ArgumentError)
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
@ -1515,7 +1515,7 @@ missing keywords: :kw2, :kw3 (ArgumentError)
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
@ -1536,7 +1536,7 @@ unknown keyword: :kw4 (ArgumentError)
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
@ -1557,7 +1557,7 @@ unknown keywords: :kw4, :kw5 (ArgumentError)
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
@ -1587,7 +1587,7 @@ wrong number of arguments (given 1, expected 3) (ArgumentError)
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
@ -1609,7 +1609,7 @@ wrong number of arguments (given 1, expected 0) (ArgumentError)
MethodDefLocationSupported ?
"| v = -> {}
^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END
@ -1631,7 +1631,7 @@ wrong number of arguments (given 1, expected 0) (ArgumentError)
MethodDefLocationSupported ?
"| v = lambda { }
^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END
@ -1657,7 +1657,7 @@ wrong number of arguments (given 1, expected 2) (ArgumentError)
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