Skip to content

Commit

Permalink
Revert "Merge pull request #1650 from sampersand/swesterman/23-11-26/…
Browse files Browse the repository at this point in the history
…bugfix-RBS.Test.Errors.inspect_"

This reverts commit b9930cb, reversing
changes made to a15863f.
  • Loading branch information
soutaro committed Dec 20, 2023
1 parent 94db3e5 commit 82c246c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/rbs/test/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ def self.format_param(param)
end
end

RESPOND_TO = ::Kernel.instance_method :respond_to?
private_constant :RESPOND_TO

def self.inspect_(obj)
if RESPOND_TO.bind_call(obj, :inspect)
if obj.respond_to?(:inspect)
obj.inspect
else
Test::INSPECT.bind(obj).call # For the case inspect is not defined (like BasicObject)
Expand Down

0 comments on commit 82c246c

Please sign in to comment.