Skip to content

Commit

Permalink
noquote fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@10392 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Aug 23, 2000
1 parent c1158ba commit 1375c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -157,6 +157,7 @@ BUG FIXES
o Internal function fprec was overflowing for numbers around
1e-305.

o print.noquote("ABC") now works.


**************************************************
Expand Down
11 changes: 6 additions & 5 deletions src/library/base/R/print.R
Expand Up @@ -34,14 +34,15 @@ as.matrix.noquote <- function(x) noquote(NextMethod("as.matrix", x))
attr <- attributes(x)
r <- unclass(x)[...]
attributes(r) <- c(attributes(r),
attr[is.na(match(names(attr),c("dim","dimnames")))])
attr[is.na(match(names(attr),
c("dim","dimnames","names")))])
r
}

print.noquote <- function(obj,...) {
if(!is.null(cl <- class(obj)))
class(obj) <- cl[cl != "noquote"]
NextMethod("print", obj, quote = FALSE, ...)
print.noquote <- function(x, ...) {
if(!is.null(cl <- class(x)))
class(x) <- cl[cl != "noquote"]
print(x, quote = FALSE, ...)
}

## for alias:
Expand Down

0 comments on commit 1375c47

Please sign in to comment.