Skip to content

Instantly share code, notes, and snippets.

@stevegraham
Created March 26, 2010 17:22
Show Gist options
  • Save stevegraham/345141 to your computer and use it in GitHub Desktop.
Save stevegraham/345141 to your computer and use it in GitHub Desktop.
[NilClass, FalseClass, TrueClass, Symbol, Numeric, Class, Module].each { |klass| klass.class_eval { def duplicable?() false end } }
# Or even…
[NilClass, FalseClass, TrueClass, Symbol, Numeric, Class, Module].each do |klass|
klass.class_eval { def duplicable?() false end }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment