Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit private callback lookup. #58

Merged
merged 1 commit into from
Jan 19, 2013
Merged

Limit private callback lookup. #58

merged 1 commit into from
Jan 19, 2013

Commits on Dec 15, 2012

  1. Limit lookup scope for private callbacks.

    Background: Commit 71937c0 introduced private callbacks, however, the use of "private_method_defined?" returns true all the way down the class hierarchy and thus causes trouble with a very common transition: Given an event "event :fail transitions_to :failed". If you don't explicitly define the "fail" event handler, "private_method_defined?" will still return true since Kernel#fail is defined for any object. Transitioning with "fail!" then causes a runtime error.
    Sven Schwyn committed Dec 15, 2012
    Configuration menu
    Copy the full SHA
    411ddab View commit details
    Browse the repository at this point in the history