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

Already on GitHub? Sign in to your account

Add default for deprecate call site #95

wants to merge 2 commits into


None yet
2 participants

sgronblo commented Dec 11, 2011

I made a simpler fix for this using the github editor just a few minutes ago in the branch patch-1. But then I figured it would be better to solve the problem by making caller[1] the default value. This won't always work, but it should avoid mistakes like using FILE for the most common cases where caller.first is the right parameter.

sgronblo added some commits Dec 11, 2011

@sgronblo sgronblo Make caller[1] default for call_site
Makes it easier to call the method correctly when the user doesn't have
to specify the call_site manually.
@sgronblo sgronblo Call deprecate without explicit call_site parameter
Will use caller[1] in deprecate by default. The previous value of
__FILE__ reported the location of the deprecation incorrectly.

jimweirich commented Oct 17, 2012

I think prefer the explicit version in this case. There is only one call site that seems to be affected by this change, so I'm not incline to include this.

@jimweirich jimweirich closed this Oct 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment