https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-02-19T09:42:50ZRuby Issue Tracking SystemRuby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=630312017-02-19T09:42:50Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/63031/diff?detail_id=43979">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>mrkn (Kenta Murata)</i></li></ul><p>Seems correct to me.</p> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=631512017-02-23T19:39:36Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>I didn't realize there was a Github repo for BigDecimal when opening this issue. May I repost it there as a pull request?</p> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=634392017-03-11T13:58:52Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>Any update on this one?</p>
<p>Should I look for more easily reproducible steps? What about opening a Github issue/PR?</p>
<p>Thanks.</p> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=634702017-03-12T04:38:12Zmrkn (Kenta Murata)muraken@gmail.com
<ul></ul><p>I'm sorry for my late response.<br>
I'll import your patch by tomorrow.</p>
<p>Thanks a lot.</p> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=635262017-03-13T06:03:23Zmrkn (Kenta Murata)muraken@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset r57951.</p>
<hr>
<p>bigdecimal: version 1.3.2</p>
<p>Import bigdecimal version 1.3.2. The full commit log is here:</p>
<p><a href="https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2" class="external">https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2</a></p>
<p>This fixes <a href="/issues/13232">[ruby-core:79603]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Comparing BigDecimal to float or Rational fails sometimes (Closed)" href="https://bugs.ruby-lang.org/issues/13232">#13232</a>]</p> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=659222017-07-25T16:29:29Zhrsht (Harshit Chopra)
<ul></ul><p>Sorry if it is not the right place to ask this question, but is it possible to backport this fix in ruby 2.4 and 2.3 versions? This issue came to light for us when using ruby 2.4, as with 2.4 BigDecimal now throws an error when trying to initialize with an invalid string.</p>
<p>So for us, it would fail at times when trying to instantiate a BigDecimal object in ruby like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">BigDecimal</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="mf">1.0e-12</span><span class="p">)</span>
</code></pre>
<p>raising error of the form:</p>
<pre><code>invalid value for BigDecimal(): ""
</code></pre> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=660642017-08-08T11:37:48Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Backport</strong> changed from <i>2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN</i> to <i>2.2: WONTFIX, 2.3: REQUIRED, 2.4: REQUIRED</i></li></ul> Ruby master - Bug #13232: Comparing BigDecimal to float or Rational fails sometimeshttps://bugs.ruby-lang.org/issues/13232?journal_id=707582018-03-03T02:07:22Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Backport</strong> changed from <i>2.2: WONTFIX, 2.3: REQUIRED, 2.4: REQUIRED</i> to <i>2.2: WONTFIX, 2.3: REQUIRED, 2.4: DONE</i></li></ul><p>ruby_2_4 r62638 merged revision(s) 57597,57951.</p>