Skip to content

Commit

Permalink
exists() only takes character first argument for R4.0 and earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Oct 8, 2024
1 parent ac9c0b7 commit f68afca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-4'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mirai
Type: Package
Title: Minimalist Async Evaluation Framework for R
Version: 1.2.0.9030
Version: 1.2.0.9031
Description: Designed for simplicity, a 'mirai' evaluates an R expression
asynchronously in a parallel process, locally or distributed over the
network, with the result automatically available upon completion. Modern
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mirai 1.2.0.9030 (development)
# mirai 1.2.0.9031 (development)

#### New Features

Expand Down
4 changes: 2 additions & 2 deletions R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ mirai <- function(.expr, ..., .args = list(), .timeout = NULL, .compute = "defau
}
data <- list(
._mirai_globals_. = globals,
.expr = if (is.symbol(expr) && exists(expr, parent.frame()) && is.language(.expr)) .expr else expr
.expr = if (is.symbol(expr) && exists(as.character(expr), parent.frame()) && is.language(.expr)) .expr else expr
)
if (length(.args)) {
if (is.environment(.args))
Expand Down Expand Up @@ -245,7 +245,7 @@ everywhere <- function(.expr, ..., .args = list(), .serial = NULL, .compute = "d

expr <- substitute(.expr)
.expr <- c(
as.expression(if (is.symbol(expr) && exists(expr, parent.frame()) && is.language(.expr)) .expr else expr),
as.expression(if (is.symbol(expr) && exists(as.character(expr), parent.frame()) && is.language(.expr)) .expr else expr),
.snapshot
)

Expand Down

0 comments on commit f68afca

Please sign in to comment.