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

Fix broken sample code for EventedFileUpdateChecker [ci skip] #27823

Merged

Conversation

kenta-s
Copy link
Contributor

@kenta-s kenta-s commented Jan 27, 2017

The second parameter should not be a lambda, a block should be given instead. otherwise it will raise an error below.
NoMethodError: undefined method each' for #<Proc:0x007f92ecb9e160@(irb):1 (lambda)>`

@rails-bot
Copy link

r? @eileencodes

(@rails-bot has picked a reviewer for you, use r? to override)

@@ -17,7 +17,7 @@ module ActiveSupport
#
# Example:
#
# checker = EventedFileUpdateChecker.new(["/tmp/foo"], -> { puts "changed" })
# checker = EventedFileUpdateChecker.new(["/tmp/foo"]) { puts "changed" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also be ActiveSupport:: EventedFileUpdateChecker?

@kenta-s kenta-s force-pushed the fix-broken-example-for-file_update_checker branch from c407773 to 221489a Compare January 27, 2017 15:24
@kenta-s
Copy link
Contributor Author

kenta-s commented Jan 27, 2017

@eileencodes
Oh, sure. Thank you for pointing out! I fixed that :)

@eileencodes eileencodes merged commit 313bf87 into rails:master Jan 27, 2017
@eileencodes
Copy link
Member

Thanks! 😸

@kenta-s kenta-s deleted the fix-broken-example-for-file_update_checker branch February 6, 2017 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants