Skip to content

Commit

Permalink
Revert "Merge pull request #1642 from sampersand/swesterman/23-11-23/…
Browse files Browse the repository at this point in the history
…fix-guaranteed"

This reverts commit 71cd5ca, reversing
changes made to 48c86b7.
  • Loading branch information
soutaro committed Dec 20, 2023
1 parent fd47b42 commit cc76d57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rbs/test/guaranteed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module Inspect

module_function def guaranteed_inspect(obj)
obj.inspect
rescue NoMethodError
rescue NoMethodError => err
raise unless err.name == :inspect && EQUAL.bind_call(obj, err.receiver)
INSPECT.bind_call(obj)
end

Expand All @@ -19,7 +20,7 @@ def inspect

instance_variables.each_with_index do |variable, index|
string.concat ', ' unless index.zero?
string.concat "#{variable}: #{guaranteed_inspect(instance_variable_get(variable))}"
string.concat "#{variable}: #{guaranteed_inspect(variable)}"
end

string.concat '>'
Expand Down

0 comments on commit cc76d57

Please sign in to comment.