Guest User

Untitled

a guest
Aug 17th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def add_to obj, name, val
  2. class << obj
  3. attr_accessor name
  4. end
  5. name.set_instance_var "@#{name}", val
  6. end
  7.  
  8. TypeError: nil is not a symbol
  9. from scratch.rb:3:in `attr_accessor'
Add Comment
Please, Sign In to add comment