Skip to content

fix object not found warning in "%<a-%" #39

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

Merged
merged 1 commit into from
Jun 19, 2015
Merged

Conversation

leeper
Copy link
Contributor

@leeper leeper commented Jun 18, 2015

The %<a-% produces an object 'x' not found warning when trying to overwrite an existing active binding, for example:

library("pryr")
a <- 1
b %<a-% (a+1)
a
# [1] 1
b
# [1] 2
b %<a-% (a+2)
# Warning message:
# In rm(x, envir = env) : object 'x' not found
a
# [1] 1
b
# [1] 3

Switching to the list argument in rm solves the problem.

@hadley
Copy link
Owner

hadley commented Jun 18, 2015

Good catch - thanks! Could you please add a bullet to NEWS?

@leeper
Copy link
Contributor Author

leeper commented Jun 18, 2015

Done.

hadley added a commit that referenced this pull request Jun 19, 2015
fix object not found warning in "%<a-%"
@hadley hadley merged commit 134a660 into hadley:master Jun 19, 2015
@hadley
Copy link
Owner

hadley commented Jun 19, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants