[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
Issue #13188 has been updated by Shyouhei Urabe.
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79769] [Ruby trunk Bug#13251][Assigned] [DOC] Add rdoc for Integer.sqrt
From:
nobu@...
Date:
2017-02-25 06:52:29 UTC
List:
ruby-core #79769
Issue #13251 has been updated by Nobuyoshi Nakada. Status changed from Open to Assigned Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONTNEED Thank you, feel free to add it. I was writing it too, but you'll make better one. This is my draft, FYI. ```diff diff --git c/NEWS i/NEWS index 2a0413f006..8647e5e2ce 100644 --- c/NEWS +++ i/NEWS @@ -21,4 +21,8 @@ with all sufficient information, see the ChangeLog file or Redmine === Core classes updates (outstanding ones only) +* Integer + + * Integer.sqrt [Feature #13219] + * Regexp * Update Onigmo 6.1.1. Modified numeric.c diff --git c/numeric.c i/numeric.c index b34fb0a5f9..c827a8c7c9 100644 --- c/numeric.c +++ i/numeric.c @@ -5155,4 +5155,22 @@ DEFINE_INT_SQRT(BDIGIT, rb_bdigit_dbl, BDIGIT_DBL) VALUE rb_big_isqrt(VALUE); +/* + * call-seq: + * Integer.sqrt(x) -> Integer + * + * Returns the largest integer which does not exceed the non-negative + * square root of _x_. Equivalent to `Math.sqrt(x).floor`, except + * for that the result of the latter code may be greater than the + * true root when _x_ exceeds the Float precision. + * + * If _x_ is not an Integer, it is converted to an Integer first. + * If _x_ is negative, a Math::DomainError is raised, as well as + * Math.sqrt. + * + * Integer.sqrt(0) #=> 0 + * Integer.sqrt(1) #=> 1 + * Integer.sqrt(10) #=> 3 + * Integer.sqrt(10**400) #=> 10**200 + */ static VALUE rb_int_s_isqrt(VALUE self, VALUE num) ``` ---------------------------------------- Bug #13251: [DOC] Add rdoc for Integer.sqrt https://bugs.ruby-lang.org/issues/13251#change-63195 * Author: Marcus Stollsteimer * Status: Assigned * Priority: Normal * Assignee: Marcus Stollsteimer * Target version: * ruby -v: ruby 2.5.0dev (2017-02-24 trunk 57707) [x86_64-linux] * Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONTNEED ---------------------------------------- Nobu, I would offer to add documentation for Integer.sqrt, feature #13219 (r57705). I'd like to prepare a patch and eventually try to commit it myself. I'm not sure yet when to open issues for documentation and when to simply commit; I would be glad about any feedback. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>