1 # depends on: module.rb class.rb
9 Object.public(*methods)
13 Object.private(*methods)
16 def protected(*methods)
17 Object.protected(*methods)
20 def add_method(name, obj)
21 Object.add_method(name, obj)
24 def alias_method(new_name, current_name)
25 Object.__send__ :alias_method, new_name, current_name
28 def __const_set__(name, obj)
29 Object.__const_set__(name, obj)
45 raise LocalJumpError, "not callable"
52 alias_method :inspect, :to_s
59 alias_method :inspect, :to_s
64 Undefined = Object.new
67 def self.inspecting?(obj)
68 stack.include?(obj.object_id)
71 def self.inspect(obj, &block)
72 stack.push(obj.object_id)
81 stack = Thread.current[:inspecting] ||= []