Project

General

Profile

Feature #10169

It might be better to make Mathn class deprecated

Added by gogotanaka (Kazuki Tanaka) about 3 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:64553]

Description

#English

As I mentioned in https://bugs.ruby-lang.org/issues/10086#change-48156,

  1. Now that we are able to hundle complex exponents without mathn.

  2. And overriding \ with quo has too much side effect. I suppose we should not implement such a thing in ruby standard library.

  3. Requiring and integrating other standard libraries doesn't make sense.

This is why I think it might be better to make Mathn class deprecated and disabled in the future.

#日本語(すみませんまだ英語が拙く、意図をより正確にお伝えするため日本語も記載させて頂きます)

僕がこちらのissueで述べさせて頂いた通り、https://bugs.ruby-lang.org/issues/10086#change-48156

  1. mathn で実装されている冪乗演算は mathn を用いずとも現在は実現されている事

  2. mathn 内で行われている \quo でオーバーライドする事は副作用が強く、またこの種のオーバーライドが必要な場面は多くなく、必要な場合でも自ら実装する事が多いと推測される事

  3. 各種数学関連のモジュールをrequireする機能もあまり意味を持たない事

以上の理由より、とりわけRubyの標準ライブラリーで現在のmathn を提供する必要を感じません.

よってmathnを非推奨に、ゆくゆくは廃止してしまうのが良いと考えています.


Related issues

Related to Ruby trunk - Bug #2121: mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quoClosed2009-09-19
Related to Ruby trunk - Feature #13335: Gemify mathnClosed
Related to Ruby trunk - Feature #13334: Removed deprecated mathn extentions.Closed

Associated revisions

Revision 47282
Added by hsbt (Hiroshi SHIBATA) about 3 years ago

  • lib/mathn.rb: mathn library is deprecated on ruby 2.2. [Feature #10169]

Revision 47282
Added by hsbt (Hiroshi SHIBATA) about 3 years ago

  • lib/mathn.rb: mathn library is deprecated on ruby 2.2. [Feature #10169]

Revision 47282
Added by hsbt (Hiroshi SHIBATA) about 3 years ago

  • lib/mathn.rb: mathn library is deprecated on ruby 2.2. [Feature #10169]

Revision 47282
Added by hsbt (Hiroshi SHIBATA) about 3 years ago

  • lib/mathn.rb: mathn library is deprecated on ruby 2.2. [Feature #10169]

Revision 58432
Added by hsbt (Hiroshi SHIBATA) 6 months ago

Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.

[Feature #10169][]

History

#1 [ruby-core:64554] Updated by matz (Yukihiro Matsumoto) about 3 years ago

Approved. Organize transition path.

Matz.

#2 [ruby-core:64555] Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r47282.


  • lib/mathn.rb: mathn library is deprecated on ruby 2.2. [Feature #10169]

#3 [ruby-core:64556] Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Closed to Open

#4 [ruby-core:64569] Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Related to Bug #2121: mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo added

#5 [ruby-core:64578] Updated by gogotanaka (Kazuki Tanaka) about 3 years ago

@Hiroshi SHIBATA

I really appreciate you doing what I should do.

#6 [ruby-core:66190] Updated by gogotanaka (Kazuki Tanaka) almost 3 years ago

It might be annoying question, it's still open?
If so, please let me know why, otherwise could you make it closed?
I just wanna make sure my tickets remains or not.

I'm sorry to your extra trouble : (

#7 Updated by hsbt (Hiroshi SHIBATA) 7 months ago

#8 [ruby-core:80249] Updated by hsbt (Hiroshi SHIBATA) 7 months ago

  • Target version set to 2.5
  • Assignee set to hsbt (Hiroshi SHIBATA)
  • Status changed from Open to Assigned

#9 Updated by hsbt (Hiroshi SHIBATA) 6 months ago

  • Related to Feature #13334: Removed deprecated mathn extentions. added

#10 [ruby-core:80804] Updated by hsbt (Hiroshi SHIBATA) 6 months ago

Note: We need to remove Math mode from irb before unbundling mathn. So it uses mathn library.

After that, We can remove mathn from ruby core. and ship rubygems.

I will do it.

#11 Updated by hsbt (Hiroshi SHIBATA) 6 months ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r58432.


Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.

[Feature #10169][]

Also available in: Atom PDF