Feature #10974
closed
[PATCH] Remove methods which has suffix `!`(sin!, cos!…) from CMath
Added by gogotanaka (Kazuki Tanaka) over 9 years ago.
Updated almost 9 years ago.
Description
Hi, now I’d like to remove methods with !
( sin!
, cos!
…) from CMath
, for the following reasons.
-
wanna keep CMath minimal. CMath#sin
should be superset of CMath#sin!
or Math#sin
is enough.
-
rdoc for CMath seems broken, CMath#sin!
isn't alias for CMath#sin
thanks, gogo.
Files
I am OK with this change. Does anyone else have opinon on this?
E.g. compatibility issue?
Matz.
matz@ruby-lang.org wrote:
I am OK with this change. Does anyone else have opinon on this?
E.g. compatibility issue?
I don't use CMath, but I suggest a deprecation period since it appears
this is a public API. We should never break public API without adequate
warning.
Maybe:
- deprecate at 2.3.0
- remove when 2.3 branch is EOL for backports/releases
Eric Wong wrote:
I don't use CMath, but I suggest a deprecation period since it appears
this is a public API. We should never break public API without adequate
warning.
Maybe:
- deprecate at 2.3.0
- remove when 2.3 branch is EOL for backports/releases
Thanks for comment! I suppose these methods(Math.cos!, sin!..) got public by accident, but your point dose really make sense.
Here is a patch to deprecate these methods.
I'll commit it in a while.
- Subject changed from [PATCH] Remove methods with `!`(sin!, cos!…) from CMath to [PATCH] Remove methods which has suffix `!`(sin!, cos!…) from CMath
i know this ticket got closed by the change of gogo,
but i want to ask (maybe in a different ticket later)
if its would be ok to have a deprecate_methods function like the deprecate_constant method in core?
#11588 might be similar to what i want
- Status changed from Open to Closed
Applied in changeset r52715.
- lib/cmath.rb: methods which has suffix '!' are now deprecated.
Re-apply r52469 made by Kazuki Tanaka, with fixing bug about
mathn.rb compatibility. [ruby-core:68528] [Feature #10974]
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0