[#56333] [CommonRuby - Feature #8723][Open] Array.any? predicate returns true for empty array. — "nurettin (Nurettin Onur TUGCU)" <onurtugcu@...>
[#56368] [ruby-trunk - Bug #8730][Open] "rescue Exception" rescues Timeout::ExitException — "takiuchi (Genki Takiuchi)" <genki@...21g.com>
2013/8/28 nobu (Nobuyoshi Nakada) <nobu@ruby-lang.org>:
[#56389] [ruby-trunk - Feature #8738][Open] Integer#single_bit? (Actually Fixnum#single_bit? and Bignum#single_bit?) — "akr (Akira Tanaka)" <akr@...>
[#56407] [ruby-trunk - misc #8741][Open] email notification on bugs.ruby-lang.org is broken — "rits (First Last)" <redmine@...>
[#56517] Re: [ruby-cvs:49638] zzak:r42496 (trunk): * lib/time.rb: [DOC] Document constants by @markijbema [Fixes GH-377] — Tanaka Akira <akr@...>
2013/8/11 <zzak@ruby-lang.org>:
[#56523] [ruby-trunk - Bug #8769][Open] [PATCH] process.c (rb_fork_internal): remove cloexec setting — "normalperson (Eric Wong)" <normalperson@...>
[#56524] [ruby-trunk - Bug #8770][Open] [PATCH] process.c: avoid EINTR from Process.spawn — "normalperson (Eric Wong)" <normalperson@...>
[#56536] [ruby-trunk - Feature #8772][Open] Hash alias #| merge, and the case for Hash and Array polymorphism — "trans (Thomas Sawyer)" <redmine@...>
[#56551] [CommonRuby - Feature #8777][Open] Process.mach_absolute_time — "tenderlovemaking (Aaron Patterson)" <tenderlove@...>
[#56567] [ruby-trunk - Feature #8780][Assigned] DBM#to_h alias for #to_hash — "zzak (Zachary Scott)" <e@...>
[#56569] [ruby-trunk - Feature #8781][Open] Use require_relative() instead of require() if possible — "ko1 (Koichi Sasada)" <redmine@...>
On Sat, Aug 17, 2013 at 07:17:50AM +0900, trans (Thomas Sawyer) wrote:
(13/08/17 13:13), Aaron Patterson wrote:
(2013/08/12 15:35), ko1 (Koichi Sasada) wrote:
(2013/08/13 2:25), drbrain (Eric Hodel) wrote:
On Tue, Aug 13, 2013 at 07:38:01AM +0900, SASADA Koichi wrote:
(2013/08/16 14:21), Aaron Patterson wrote:
On Fri, Aug 16, 2013 at 03:00:59PM +0900, SASADA Koichi wrote:
Em 16-08-2013 03:24, Aaron Patterson escreveu:
On Fri, Aug 16, 2013 at 09:35:04AM -0300, Rodrigo Rosenfeld Rosas wrote:
[#56634] [ruby-trunk - Feature #8788][Open] use eventfd on newer Linux instead of pipe for timer thread — "normalperson (Eric Wong)" <normalperson@...>
(2013/08/16 10:47), normalperson (Eric Wong) wrote:
SASADA Koichi <ko1@atdot.net> wrote:
Hi
KOSAKI Motohiro <kosaki.motohiro@gmail.com> wrote:
[#56658] [ruby-trunk - Feature #8796][Open] Use GMP to accelerate Bignum operations — "akr (Akira Tanaka)" <akr@...>
[#56672] Re: [ruby-cvs:49733] eregon:r42591 (trunk): * process.c (rb_clock_gettime): document CLOCK_REALTIME and — Tanaka Akira <akr@...>
2013/8/17 <eregon@ruby-lang.org>:
On 17 August 2013 02:52, Tanaka Akira <akr@fsij.org> wrote:
[#56746] [ruby-trunk - Bug #8803][Open] Another buffer overflow — "user021 (a s)" <user021@...>
[#56753] [ruby-trunk - Feature #8804][Open] ONCE syntax — "ko1 (Koichi Sasada)" <redmine@...>
[#56762] [ruby-trunk - Bug #8805][Open] Ruby GC::Profiler returns incorrect info on Solaris (and relatives) — "sax (Eric Saxby)" <sax@...>
[#56780] [ruby-trunk - Feature #8809][Open] Process.clock_getres — "akr (Akira Tanaka)" <akr@...>
[#56795] [ruby-trunk - Bug #8816][Open] Tempfile.new may return the same name for parallel calls — "375gnu (Hleb Valoshka)" <redmine@...>
[#56809] [ruby-trunk - Feature #8820][Open] Speed up Array#index — "trans (Thomas Sawyer)" <redmine@...>
"trans (Thomas Sawyer)" <redmine@ruby-lang.org> wrote:
[#56824] [ruby-trunk - Feature #8823][Open] Run trap handler in an independent thread called "Signal thread" — "ko1 (Koichi Sasada)" <redmine@...>
2013/8/27 ko1 (Koichi Sasada) <redmine@ruby-lang.org>:
[#56839] [ANN] Ruby Developer Meeting 20130831 — "NARUSE, Yui" <naruse@...>
Hi,
Hi,
[#56861] [ruby-trunk - Feature #3620] Add Queue, SIzedQueue and ConditionVariable implementations in C in addition to ruby ones — "ko1 (Koichi Sasada)" <redmine@...>
"ko1 (Koichi Sasada)" <redmine@ruby-lang.org> wrote:
[#56866] [ruby-trunk - Feature #8834][Open] Kernel#load_relative — "sawa (Tsuyoshi Sawada)" <sawadatsuyoshi@...>
[#56890] [ruby-trunk - Feature #8839][Open] Class and module should return the class or module that was opened — "headius (Charles Nutter)" <headius@...>
[#56894] [ruby-trunk - Feature #8840][Open] Yielder#state — "marcandre (Marc-Andre Lafortune)" <ruby-core@...>
[#56911] [ruby-trunk - Feature #8846][Open] Publicize Module#include — "matsuda (Akira Matsuda)" <ronnie@...>
[ruby-core:56835] [ruby-trunk - Bug #8826][Open] BigDecimal#div and #quo different behavior and inconsistencies
Issue #8826 has been reported by karatedog (F旦ldes L叩szl坦). ---------------------------------------- Bug #8826: BigDecimal#div and #quo different behavior and inconsistencies https://bugs.ruby-lang.org/issues/8826 Author: karatedog (F旦ldes L叩szl坦) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN BigDecimal's #div and #quo method behave differently despite the #div documentation says: "See BigDecimal#quo" #div returns Fixnum if there is no precision argument for #div (this parameter is not documented): 2.0.0-p247 :018 > BigDecimal(5).div(5).class => Fixnum 2.0.0-p247 :031 > BigDecimal(5).div(5.1).class => Fixnum #div returns Fixnum even for a Float argument: 2.0.0-p247 :118 > BigDecimal(5).div(5.01) => 0 It returns Fixnum even if every argument is BigDecimal: 2.0.0-p247 :043 > BigDecimal(5).div(BigDecimal(5.1,5)).class => Fixnum When provided the precision argument, #div returns BigDecimal: 2.0.0-p247 :036 > BigDecimal(5).div(5,8).class => BigDecimal 2.0.0-p247 :131 > BigDecimal(5).div(BigDecimal(5.1,5),8).class => BigDecimal But first argument cannot be Float along with precision: 2.0.0-p247 :032 > BigDecimal(5).div(5.1,8).class ArgumentError: Float can't be coerced into BigDecimal without a precision from (irb):32:in `div' from (irb):32 from /home/karatedog/.rvm/rubies/ruby-2.0.0-p247/bin/irb:13:in `<main>' Whereas #quo does not accept a precision argument and returns BigDecimal (hence no configurable precision here, although the documentation says that #quo applies round operation): 2.0.0-p247 :121 > BigDecimal(5).quo(5.01) => #<BigDecimal:8bacf68,'0.9980039920 1596806387 225549E0',27(45)> Circumventing the precision with class method does not work on #quo, it's like the limit is maxed: 2.0.0-p247 :135 > BigDecimal::limit(5) => 5 2.0.0-p247 :136 > BigDecimal(1).quo(3) => #<BigDecimal:899c778,'0.33333E0',9(36)> 2.0.0-p247 :080 > BigDecimal::limit(50) => 5 2.0.0-p247 :081 > BigDecimal(1).quo(3) => #<BigDecimal:8a92d94,'0.3333333333 33333333E0',18(36)> Precision does not seem to be automatic: 2.0.0-p247 :141 > BigDecimal::limit(500) => 100 2.0.0-p247 :142 > BigDecimal(1).quo(229) => #<BigDecimal:8be67f4,'0.4366812227 074236E-2',18(36)> 229 is a full period prime, its reciprocal yields 228 fractional digits before repetition. Whereas #div's precision can be larger than #div's: 2.0.0-p247 :109 > BigDecimal(1).div(3,19) => #<BigDecimal:8acb2d4,'0.3333333333 333333333E0',27(54)> And for 229: 2.0.0-p247 :144 > BigDecimal(1).div(229,250) => #<BigDecimal:8bc8b28,'0.4366812227 0742358078 6026200873 3624454148 4716157205 2401746724 8908296943 2314410480 3493449781 6593886462 8820960698 6899563318 7772925764 1921397379 9126637554 5851528384 2794759825 3275109170 3056768558 9519650655 0218340611 3537117903 9301310043 6681222707... Expected behavior: - One division method to rule them all :-) (#Division) - Never truncate a result (aka no Fixnum/Bignum as result). If someone uses BigDecimal, they probably wanted large precision instead of truncating the results by default. - #Division should accept Float, Rational, String, Complex, Integer, BigDecimal as divisor, even Float w/o precision. (This is intended as a full list of acceptable classes, #div and #quo can already take different classes as arguments). - #Division should accept a precision argument which would override ::Limit (as this happens in many instance method), this argument is optional. Without precision argument, use ::Limit as for now proper calculation only happens if: - method is #div - the divisor is converted to BigDecimal - a precision argument is given to #div -- http://bugs.ruby-lang.org/