public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7
A = Class.new
 
A.instance_eval { def defined_in_instance_eval; :instance_eval; end }
A.class_eval { def defined_in_class_eval; :class_eval; end }
 
A.new.defined_in_class_eval # => :class_eval
A.defined_in_instance_eval # => :instance_eval

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.