Bug 15242 - insertSource doesn't work against S4 methods
Summary: insertSource doesn't work against S4 methods
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: S4methods (show other bugs)
Version: R 2.15.3
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2013-03-23 19:12 UTC by ARABIKI Takeshi
Modified: 2013-03-24 07:17 UTC (History)
0 users

See Also:


Attachments
make insertSource support S4 methods (1.70 KB, application/octet-stream)
2013-03-23 19:12 UTC, ARABIKI Takeshi
Details
support multiple signatures and methods without setGeneric call (2.63 KB, patch)
2013-03-24 07:17 UTC, ARABIKI Takeshi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ARABIKI Takeshi 2013-03-23 19:12:11 UTC
Created attachment 1420 [details]
make insertSource support S4 methods

There are three issues on insertSource as below:
1. `differs` function in `.copyMethods` is wrong
2. `setMethod` does nothing if `cacheOnAssign(where)` is FALSE
3. the result of `allMethodTables()` is substituted to `methods` when evaluate `length(methods)` and `length(methods)` can be greater than 0


I don't know much about S4, but I think the attached patch is useful to fix these issues.

note:
`missing(functions) & missing(methods)` will be always `FALSE` by applying the patch when evaluating `force`, because `missing(methods)` is always `TRUE`.
I think using both of default argument and `missing` function is very confusing.
Comment 1 ARABIKI Takeshi 2013-03-24 07:17:42 UTC
Created attachment 1421 [details]
support multiple signatures and methods without setGeneric call

I have modified the patch slightly to support multiple signatures and methods without setGeneric call.