[ruby/prism] Call #inspect on diagnostic levels

* So it's clear it is a Symbol.
  Before:
  ... @level=warning_verbose_true>
  After:
  ... @level=:warning_verbose_true>

https://github.com/ruby/prism/commit/84503643b9
This commit is contained in:
Benoit Daloze 2024-01-27 11:05:30 +01:00 committed by git
parent 2217e08340
commit c2e2d2398b

View File

@ -329,7 +329,7 @@ module Prism
# Returns a string representation of this error. # Returns a string representation of this error.
def inspect def inspect
"#<Prism::ParseError @message=#{@message.inspect} @location=#{@location.inspect} @level=#{@level}>" "#<Prism::ParseError @message=#{@message.inspect} @location=#{@location.inspect} @level=#{@level.inspect}>"
end end
end end
@ -358,7 +358,7 @@ module Prism
# Returns a string representation of this warning. # Returns a string representation of this warning.
def inspect def inspect
"#<Prism::ParseWarning @message=#{@message.inspect} @location=#{@location.inspect} @level=#{@level}>" "#<Prism::ParseWarning @message=#{@message.inspect} @location=#{@location.inspect} @level=#{@level.inspect}>"
end end
end end