[#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:79731] [Ruby trunk Bug#13104] mathn.rb affects Rational literals
From:
sto.mar@...
Date:
2017-02-23 20:19:38 UTC
List:
ruby-core #79731
Issue #13104 has been updated by Marcus Stollsteimer.
Seems to be triggered by `ext/mathn/rational/rational.c` and `ext/mathn/complex/complex.c`, which activate "canonicalization" in `rational.c` and `complex.c`.
```
$ ruby -r mathn/rational -e 'p Rational(2/1)'
2
$ ruby -r mathn/complex -e 'p Complex("3+0i")'
3
```
I suppose the reasoning behind the behavior was that in mathematics generally the simplest representation of a number is used, and n/1 = n.
But what are the plans for `mathn` anyway? -- It seems to be deprecated since 2.2 (#10169).
----------------------------------------
Bug #13104: mathn.rb affects Rational literals
https://bugs.ruby-lang.org/issues/13104#change-63152
* Author: Nobuyoshi Nakada
* Status: Assigned
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Target version: 2.5
* ruby -v: r57270
* Backport: 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
----------------------------------------
Without mathn:
```
$ ruby -e 'p 1.0r'
(1/1)
```
With mathn:
```
$ ruby -rmathn -e 'p 1.0r'
1
```
Is this intentional?
https://github.com/ruby/ruby/compare/trunk...nobu:bug/rational-literal-mathn
--
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>