class RSpec::Support::ObjectFormatter::UninspectableObjectInspector
Constants
- OBJECT_ID_FORMAT
Public Class Methods
Source
# File lib/rspec/support/object_formatter.rb, line 200 def self.can_inspect?(object) object.inspect false rescue NoMethodError true end
Public Instance Methods
Source
# File lib/rspec/support/object_formatter.rb, line 207 def inspect "#<#{klass}:#{native_object_id}>" end
Source
# File lib/rspec/support/object_formatter.rb, line 211 def klass Support.class_of(object) end
Source
# File lib/rspec/support/object_formatter.rb, line 216 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