Skip to content

Instantly share code, notes, and snippets.

@codesword
Created June 5, 2016 11:56
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 codesword/d79295fcd230dde63d9bacf52f7ff2fc to your computer and use it in GitHub Desktop.
Save codesword/d79295fcd230dde63d9bacf52f7ff2fc to your computer and use it in GitHub Desktop.
class Person
name = %q{def name; "Ikem Okonkwo"; end}
class_eval(name)
end
Person.name #=> undefined method error
Person.new.name #=> "Ikem Okonkwo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment