View | Details | Raw Unified | Return to bug 16490 | Differences between
and this patch

Collapse All | Expand All

(-)src/library/methods/R/RMethodUtils.R (-3 / +1 lines)
Lines 483-489 Link Here
483
    value <- if(missing(where))
483
    value <- if(missing(where))
484
        .getGenericFromCache(f, where,  package) ## else NULL
484
        .getGenericFromCache(f, where,  package) ## else NULL
485
    if(is.null(value)) {
485
    if(is.null(value)) {
486
        if(is.character(f) && f %in% "as.double") f <- "as.numeric"
487
        if(is.character(f) && !nzchar(f)) {
486
        if(is.character(f) && !nzchar(f)) {
488
            message("Empty function name in .getGeneric")
487
            message("Empty function name in .getGeneric")
489
            dput(sys.calls())
488
            dput(sys.calls())
Lines 491-498 Link Here
491
        value <- .Call(C_R_getGeneric, f, FALSE, as.environment(where), package)
490
        value <- .Call(C_R_getGeneric, f, FALSE, as.environment(where), package)
492
        ## cache public generics (usually these will have been cached already
491
        ## cache public generics (usually these will have been cached already
493
        ## and we get to this code for non-exported generics)
492
        ## and we get to this code for non-exported generics)
494
        if(!is.null(value) && !is.null(vv <- get0(f, .GlobalEnv)) &&
493
        if(!is.null(value) && !is.null(vv <- .GlobalEnv[[f]]) && identical(vv, value))
495
           identical(vv, value))
496
            .cacheGeneric(f, value)
494
            .cacheGeneric(f, value)
497
    }
495
    }
498
    ##     if(is.null(value) && nzchar(package) && !identical(package, "base")) {
496
    ##     if(is.null(value) && nzchar(package) && !identical(package, "base")) {

Return to bug 16490