Skip to content

Instantly share code, notes, and snippets.

@hasclass
Created October 27, 2010 15:38
Show Gist options
  • Save hasclass/649279 to your computer and use it in GitHub Desktop.
Save hasclass/649279 to your computer and use it in GitHub Desktop.
class Foo
def method_missing(method_name, *args)
return if method_name == :to_ary
# ...
end
end
# Running above benchmark
# user system total real
# flatten Object objects 0.000000 0.000000 0.000000 ( 0.014153)
# flatten Foo objects 0.060000 0.040000 0.100000 ( 0.094241)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment