https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112013-09-27T06:12:49ZRuby Issue Tracking SystemBackport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=420212013-09-27T06:12:49Zzzak (zzak _)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul><p>It seems the documentation is wrong, the implementation is a required argument: <a href="https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/util.rb#L119" class="external">https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/util.rb#L119</a></p>
<p>I have asked for feedback from murata-san to confirm this spec in BigDecimal.</p>
<p>Thank you for finding this bug!</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=424722013-10-16T00:07:38Zzzak (zzak _)
<ul></ul><p>Still looking into this one E.J. thanks for your patience.</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=425062013-10-18T01:03:36Zmrkn (Kenta Murata)muraken@gmail.com
<ul></ul><p>I think this is a bug of Rational#to_d. I'll fix it.</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=428462013-11-11T01:42:54Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul></ul><p><a class="user active user-mention" href="https://bugs.ruby-lang.org/users/482">@mrkn (Kenta Murata)</a> I'm not sure it would make sense to have a default precision here... Is there a default precision anywhere in the BigDecimal library?</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=429002013-11-13T18:56:27Zmrkn (Kenta Murata)muraken@gmail.com
<ul></ul><p><a class="user active user-mention" href="https://bugs.ruby-lang.org/users/182">@marcandre (Marc-Andre Lafortune)</a> Yes. We cannot determine a default precision for a rational number generally. I think I confused when I replied #3.</p>
<p>So this issue can be closed.</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=429032013-11-13T19:23:16Zzzak (zzak _)
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r43669.<br>
E.J., thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required<br>
+precision+ argument for Rational#to_d [Bug <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Rational#to_d don't match documentation (Closed)" href="https://bugs.ruby-lang.org/issues/8958">#8958</a>]<br>
-This line, and those below, will be ignored--</li>
</ul>
<p>M ChangeLog<br>
M ext/bigdecimal/lib/bigdecimal/util.rb</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=429052013-11-13T23:12:38Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li><li><strong>Backport</strong> set to <i>1.9.3: DONTNEED, 2.0.0: REQUIRED</i></li></ul><p>Hi,</p>
<p>There are still examples of Rational#to_d without arguments in documentation at call-seq section and sample code.</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=429092013-11-14T01:58:41Zzzak (zzak _)
<ul><li><strong>Assignee</strong> changed from <i>zzak (zzak _)</i> to <i>nagachika (Tomoyuki Chikanaga)</i></li></ul><p><a class="user active user-mention" href="https://bugs.ruby-lang.org/users/404">@nagachika (Tomoyuki Chikanaga)</a> good catch, i removed the incorrect call-seq in r43672: <a href="https://github.com/ruby/ruby/commit/62d3853" class="external">https://github.com/ruby/ruby/commit/62d3853</a></p>
<p>I will assign it to you for backporting, thanks!</p> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=429362013-11-14T23:40:56Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>This issue was solved with changeset r43678.<br>
E.J., thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of<br>
Rational#to_d without argument. [Bug <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Rational#to_d don't match documentation (Closed)" href="https://bugs.ruby-lang.org/issues/8958">#8958</a>]</li>
</ul> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=437962013-12-21T14:53:58Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Backport</i></li><li><strong>Project</strong> changed from <i>Ruby master</i> to <i>Backport200</i></li><li><strong>Category</strong> deleted (<del><i>doc</i></del>)</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li></ul> Backport200 - Backport #8958: Rational#to_d don't match documentationhttps://bugs.ruby-lang.org/issues/8958?journal_id=437972013-12-21T14:55:23Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>This issue was solved with changeset r44314.<br>
E.J., thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<p>merge revision(s) 43669,43672,43678: [Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Rational#to_d don't match documentation (Closed)" href="https://bugs.ruby-lang.org/issues/8958">#8958</a>]</p>
<pre><code>* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
+precision+ argument for Rational#to_d [Bug #8958]
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
Rational#to_d without argument. [Bug #8958]
</code></pre>