11
2- R Under development (unstable) (2024-09-12 r87143 ) -- "Unsuffered Consequences"
2+ R Under development (unstable) (2024-12-19 r87451 ) -- "Unsuffered Consequences"
33Copyright (C) 2024 The R Foundation for Statistical Computing
44Platform: x86_64-pc-linux-gnu
55
@@ -1465,6 +1465,10 @@ Y 4 10 16 22
14651465> try(log("a"))
14661466Error in log("a") : non-numeric argument to mathematical function
14671467>
1468+ > op <- options(warn = -1)
1469+ > # *ignore* warnings (for now) to keep the output deterministic wrt to
1470+ > # warning about closing an unused connections by the gc
1471+ >
14681472> ## capture all the output to a file.
14691473> zz <- file("all.Rout", open="wt")
14701474> sink(zz)
@@ -1473,12 +1477,10 @@ Error in log("a") : non-numeric argument to mathematical function
14731477>
14741478> ## bail out
14751479> closeAllConnections()
1476- Warning message:
1477- In .Internal(gc(verbose, reset, full)) :
1478- closing unused connection 3 (all.Rout)
14791480> (foo <- showConnections())
14801481 description class mode text isopen can read can write
14811482> stopifnot(nrow(foo) == 0)
1483+ > options(op) # re-enable warnings
14821484> try(log("a"))
14831485Error in log("a") : non-numeric argument to mathematical function
14841486> unlink("all.Rout")
@@ -6391,7 +6393,7 @@ function(given = NULL) {
63916393 if (is.null(given)) callObj$default <- TRUE
63926394 callObj
63936395}
6394- <bytecode: 0x5576bf5fbdf8 >
6396+ <bytecode: 0x6176199e3d98 >
63956397> print(foo, useSource = FALSE)
63966398function (given = NULL)
63976399{
@@ -6402,7 +6404,7 @@ function (given = NULL)
64026404 callObj$default <- TRUE
64036405 callObj
64046406}
6405- <bytecode: 0x5576bf5fbdf8 >
6407+ <bytecode: 0x6176199e3d98 >
64066408> attr(foo, "srcref") <- NULL
64076409> foo
64086410function (given = NULL)
@@ -6414,7 +6416,7 @@ function (given = NULL)
64146416 callObj$default <- TRUE
64156417 callObj
64166418}
6417- <bytecode: 0x5576bf5fbdf8 >
6419+ <bytecode: 0x6176199e3d98 >
64186420> (f <- structure(function(){}, note = "just a note",
64196421+ yada = function() "not the same"))
64206422function(){}
@@ -8367,7 +8369,7 @@ Error in f() : argument is missing, with no default
83678369> withAutoprint({ show.srcref() })
83688370 language show.srcref()
83698371 - attr(*, "srcref")= 'srcref' int [1:8] 1 21 1 33 21 33 3 3
8370- ..- attr(*, "srcfile")=Classes 'srcfilealias', 'srcfile' <environment: 0x5576bf84ef28 >
8372+ ..- attr(*, "srcfile")=Classes 'srcfilealias', 'srcfile' <environment: 0x61761aa14088 >
83718373> ## no attr(*, "src..") in R <= 4.3.1
83728374> ##
83738375> withAutoprint({
@@ -8380,5 +8382,5 @@ Error in f() : argument is missing, with no default
83808382>
83818383> # ----- Last line -------------
83828384> cat('Time elapsed: ', proc.time(),'\n')
8383- Time elapsed: 1.611 0.108 1.836 0.002 0.004
8385+ Time elapsed: 0.735 0.05 0.793 0.001 0.001
83848386>
0 commit comments