class RSpec::Support::ObjectFormatter::UninspectableObjectInspector
Constants
- OBJECT_ID_FORMAT
Public Class Methods
# File rspec-support/lib/rspec/support/object_formatter.rb, line 202 def self.can_inspect?(object) object.inspect false rescue NoMethodError true end
Public Instance Methods
# File rspec-support/lib/rspec/support/object_formatter.rb, line 209 def inspect "#<#{klass}:#{native_object_id}>" end
# File rspec-support/lib/rspec/support/object_formatter.rb, line 213 def klass Support.class_of(object) end
# File rspec-support/lib/rspec/support/object_formatter.rb, line 218 def native_object_id OBJECT_ID_FORMAT % (object.__id__ << 1) rescue NoMethodError # In Ruby 1.9.2, BasicObject responds to none of #__id__, #object_id, #id... '-' end