Skip to content

Commit 8445670

Browse files
committed
restore ! behavior
1 parent 00f6516 commit 8445670

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

R/ops.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#'
2727
#' @export
2828
Ops.errors <- function(e1, e2) {
29+
if (.Generic == "!")
30+
return(NextMethod())
31+
2932
cmp <- .Generic %in% c("==", "!=", "<", ">", "<=", ">=") # comparison-type
3033
pm <- .Generic %in% c("+", "-") # addition-type
3134
prd <- .Generic %in% c("*", "/", "%/%", "%%") # product-type

tests/testthat/test-ops.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ test_that("boolean ops return probabilities", {
4242
expect_equal(x1 != y1, c(TRUE, TRUE))
4343

4444
# not allowed
45-
expect_error(!x1, "not allowed")
4645
expect_error(x1 & x1, "not allowed")
4746
expect_error(x1 | x1, "not allowed")
4847
})

0 commit comments

Comments
 (0)