Skip to content

Instantly share code, notes, and snippets.

@febuiles
Created January 16, 2012 22:20
Show Gist options
  • Save febuiles/1623354 to your computer and use it in GitHub Desktop.
Save febuiles/1623354 to your computer and use it in GitHub Desktop.
class Foo
foo = %w(a b c)
bar = %w(a b c)
foo.each do |method|
define_method(method) { p method.upcase! }
end
bar.each do |method|
define_method(method.upcase!) { p method }
end
p foo
p bar
end
Foo.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment