Class: BasicObject

Defined in:
lib/sr/core_patches.rb

Direct Known Subclasses

Object

Instance Method Summary collapse

Instance Method Details

#__binding__Binding

Used by ‘sr` to allow the same general access to `BasicObject` instances

that `Object#__binding__` permits for all other objects.

Returns:

  • (Binding)

    an unclean ‘Binding` instance representing the current binding of this object



9
10
11
12
13
14
15
16
# File 'lib/sr/core_patches.rb', line 9

def __binding__
  (class << self ; self end).class_eval "    def __fallback_binding__\n      ::Kernel.binding\n    end\n  END\n  self.__fallback_binding__\nend\n"

#inspectString Also known as: to_s

Returns a simple inspection string.

Returns:

  • (String)

    a simple inspection string



19
20
21
# File 'lib/sr/core_patches.rb', line 19

def inspect
  '#<BasicObject>'
end