Project

General

Profile

This project is closed and read-only.

Actions

Backport #8914

closed

r42942

Backport #8914: r42942

Added by tadf (tadayoshi funaba) about 13 years ago. Updated over 10 years ago.


Description

r42942 同様にする。

r28844, r28886, r28887 などの意味不明な修正を無効化する。

Updated by nagachika (Tomoyuki Chikanaga) about 13 years ago Actions #1 [ruby-dev:47727]

  • Status changed from Open to Assigned
  • Assignee set to nagachika (Tomoyuki Chikanaga)

Updated by nagachika (Tomoyuki Chikanaga) over 12 years ago Actions #2 [ruby-dev:47945]

  • Priority changed from 5 to Normal
  • ruby -v set to 2.0.0p353

Hello,

I'd like to backport a patch shown below, but TestBignum#test_quo in test_bignum.rb become failure with it.

backport patch:

--- rational.c (revision 44793)
+++ rational.c (working copy)
@@ -903,16 +903,6 @@
other, ONE, '/');
}
case T_FLOAT:

  •   {
    
  •       double x = RFLOAT_VALUE(other), den;
    
  •       get_dat1(self);
    
  •       if (isnan(x)) return DBL2NUM(NAN);
    
  •       if (isinf(x)) return INT2FIX(0);
    
  •       if (x != 0.0 && modf(x, &den) == 0.0) {
    
  •           return rb_rational_raw2(dat->num, f_mul(rb_dbl2big(den), dat->den));
    
  •       }
    
  •   }
      return rb_funcall(f_to_f(self), '/', 1, other);
     case T_RATIONAL:
      if (f_zero_p(other))
    

failed test

TestBignum#test_quo = 0.00 s

  1. Failure:
    test_quo(TestBignum) [/Users/nagachika/opt/ruby-2.0.0/src/ruby_2_0_0/test/ruby/test_bignum.rb:423]:
    <35249714121083826571348148398002815464391421343966471060391382605731070276854749365048330296473663862456968155395298373973259049475943113619888338673116133666814706870765271907656205646018608369985558721267670321739031938633833281889192620158426531806923144239269726876399951961191980348023291703472305763782410394589758934585631111078120435303032688818751446435291371357171755632775362932694795076313436687469638004327689390246735321855830610856865924913760826763776003265851716557334210642277343475757799780499021559822412434275087084317293455129570406707590002071704673135527533543217355987568107697577946785796412456048360072965616871024866244650081059068183038134518514222987186837394598019859512993600379236190197576838905080733359989094687008999416247722020061992559931401872357379708488585003666965930609730430774107407494018065365845077094320534700692354400169824131578389153656916754682252425562742895026822086112236185768931940433324078692386463642378029291582384550904012284265277124667452816985659337497580991592510201479766500877427834566619156314388107585743546289067551052434075678195345373363919571323210113622615511765134329627207955793605376892875938357672870881305679305521293359975427801921997534891474090868113467357784359783383091085717100807228425031226776985197364359404683041506613943646666199454899363685801848776729685837803228216113833854742443409221480450232563130417709625320794971672737737385983975520047739978165124906916857931960902407397841536657650378758012409157205939513085324282439290108909069036515430690359963152986587749930516880670326145036987607052961696781556418550966201822821857978020062536824015697620957222738065538832187097409859502669196589025961199448758997373792973191723335549772394878874050854532785922475822836403793986623193174020931432381418437022760412682276382989354839625453241289807108260905134234679130954867570447354549760174691007078528452745027994943853229480544512368831378761119681616719327637308142315105120528704683515182038320225078665313911731749364255621284434304945437214609406008640520972029509955435568094888815701470419410889156523971182172814423274140955428070594328381667048286771972857703435525803544707834567774027206614143419982410109261930698311010857874866840743851472857645330929169548403751084494725893729355450473771059986801058342021902735367627900974872368137838996397379898161454825970910732858202781282973937642847973381838672980693399039429342613001595148968082010016061022316242842367672741265405434553107296623559604413326352140529618171175450657884255099334618722731697920185582437182391397673301168160682516639214706566981465961731374808949131742364752993078326367714117001404210930251538132442219335072672096865184691303027156962439777053707286583949764055151291816402546462452719134797179099210233577596277925646031824172274874084562113440043397395191065473620717104250686040896580928700842593919173283844531470952205600874482302488523867074532907781264990865351844684807012208039108287564534854500486391538876063611476665620230294811468351835374072060530215907909311281816131942219776> expected but was
    .

I know that TestBignum#test_quo was modified at r41099 in trunk ([Bug #5515]), but it contains behavior change. Even though current behavior is buggy, there can be program depend on that bug. I postpone to backport this. I'll reconsider if another request with actual case come.

Updated by naruse (Yui NARUSE) over 10 years ago Actions #3

  • Status changed from Assigned to Rejected
Actions

Also available in: PDF Atom