Actions
Bug #10578
closedAllow undefining methods in refinements
Description
Since refinements are locally scoped monkey patches, and it is possible and useful to undef a method globally, I think refinements should allow to undef methods as well as def them.
For example:
module NoPlus
refine String do
undef +
end
end
using NoPlus
"a" + "b"
Expected behavior: undefined method `+' for "a":String
Actual behavior: undef ignored
Files
Actions
Like0
Like0Like0Like0