Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

mynyml's latest activity

Saturday, April 11 2009
2430 Enumerable#every functionality was updated in Ruby on Rails
  • mynyml
    mynyml commented at 5:07 PM

    Being pure ruby, #every is understandably slower than native c Enumerable#map, and slower than the Symbol#to_proc alternative (which is built into ruby since 1....

Thursday, April 09 2009
2430 Enumerable#every functionality was updated in Ruby on Rails
  • mynyml
    mynyml commented at 2:34 AM

    Oops. wrote with typos, patched with fail. Forgot to update the proxy methods whitelist.

  • mynyml
    mynyml commented at 2:22 AM

    Add updated the original patch to contain Peter's #proxy_target and #proxy_method if someone happens to prefer this.

  • mynyml
    mynyml commented at 2:18 AM

    I've been looking at how this can be improved, and it seems like there are two options:

    1. Add special handling for #respond_to?, and warn the users in the metho...

Tuesday, April 07 2009
2430 Enumerable#every functionality was updated in Ruby on Rails
  • mynyml
    mynyml commented at 1:31 PM

    As for calling #every by itself, I agree it should be handled more gracefully; I'll work on an update this afternoon.

  • mynyml
    mynyml commented at 1:28 PM

    Sorry about the formatting. That was:

    
      enum = ['foo', 'bar', '']
      enum.every.empty?.all?              #=> false
      enum.every.empty?.any?              #=>...
  • mynyml
    mynyml commented at 1:25 PM

    I really your proxy_* methods. They provide simple introspection and feel like AR's association_proxy.

    As for #respond_to?, though, I feel it might be breaking ...

Monday, April 06 2009
2430 Enumerable#every functionality was created in Ruby on Rails
  • mynyml
    mynyml created the ticket at 4:28 PM

    This patch adds the #every method to Enumerable. It is an alternative to using Symbol#to_proc in a common context, namely with #map. It enhences readability and...