Skip to content

Commit 73ac315

Browse files
use is.character over inherits(character)
1 parent 4fdbfd1 commit 73ac315

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/io.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ read_utf8 <- function(path) {
7575
warning = function(w) w,
7676
error = function(e) e
7777
)
78-
if (inherits(out, "character")) {
78+
if (is.character(out)) {
7979
list(
8080
text = out,
8181
missing_EOF_line_break = FALSE

R/vertical.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @param x A character vector or an object of class "vertical".
66
#' @keywords internal
77
construct_vertical <- function(x) {
8-
stopifnot(inherits(x, what = c("utf8", "character", "vertical")))
8+
stopifnot(is.character(x) || inherits(x, what = c("utf8", "vertical")))
99
structure(x, class = "vertical")
1010
}
1111

0 commit comments

Comments
 (0)