JoshCheek / seeing_is_believing

Displays the results of every line of code in your file
1.3k stars 54 forks source link

NullQueue overrides too many methods #91

Closed JoshCheek closed 7 years ago

JoshCheek commented 7 years ago

Thought I'd found an object without an object id! It should prob only define these if they're not already defined. Or maybe only define instance_methods(false)

module NullQueue
  extend self
  Queue.instance_methods.each do |name|
    define_method(name) { |*| }
  end
end

ObjectSpace.each_object { |o| o.object_id || p(obj: o) }