Skip to content

Instantly share code, notes, and snippets.

@DanielVartanov
Created January 21, 2013 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielVartanov/4583164 to your computer and use it in GitHub Desktop.
Save DanielVartanov/4583164 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment