Skip to content
Permalink
Browse files

Merge pull request #5566 from rstudio/bugfix/signature-printing

don't call user-defined print methods for signature
  • Loading branch information...
kevinushey committed Oct 16, 2019
2 parents 13c33fd + fa4a408 commit 8db6f8a31cf6da2856a4c0724e035f32ca6e1c10
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/cpp/session/modules/ModuleTools.R
@@ -40,12 +40,12 @@
.Call("rs_logWarningMessage", message, PACKAGE = "(embedding)")
})

.rs.addFunction("getSignature", function(obj)
.rs.addFunction("getSignature", function(object)
{
sig = capture.output(print(args(obj)))
sig = sig[1:length(sig)-1]
sig = gsub('^\\s+', '', sig)
paste(sig, collapse='')
signature <- base::format.default(base::args(object))
length(signature) <- length(signature) - 1
trimmed <- gsub("^\\s+", "", signature)
paste(trimmed, collapse = "")
})

# Wrap a return value in this to give a hint to the

0 comments on commit 8db6f8a

Please sign in to comment.
You can’t perform that action at this time.