[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:74836] [Ruby trunk Feature#12161] Friendly BigDecimal#inspect
From:
skalee@...
Date:
2016-04-07 02:35:23 UTC
List:
ruby-core #74836
Issue #12161 has been updated by Sebastian Skalacki. I agree that `BigDecimal` output is horrible. Though I have different opinion on how it could look like. First of all, I see no point in displaying the object's address. One rarely compares two BigDecimals by their identity. Typically `#==` or`#eql?` do matter, both are overriden and neither relies on `#object_id`. Although exponential form is very useful for comparing numbers by their orders of magnitude, `Fixnum#inspect` often uses decimal format: ~~~ 1e10.inspect # => "10000000000.0" 1e20.inspect # => "1.0e+20" ~~~ On the other hand, the BigDecimal's exponent and the number of significant digits seem to be quite important because hash equality relies on them. I'm not sure if it's sufficient reason to include them in `#inspect` output though. ---------------------------------------- Feature #12161: Friendly BigDecimal#inspect https://bugs.ruby-lang.org/issues/12161#change-57965 * Author: Max Melentiev * Status: Assigned * Priority: Normal * Assignee: Kenta Murata ---------------------------------------- Can BigDecimal's #inspect be more human-friendly? Even just `#<BigDecimal:b7ea1130,1234.5678,8(12)>` instead of `#<BigDecimal:b7ea1130,'0.12345678E4',8(12)>` will be much easy to read. But I think the best option is `1234.5678(#<BigDecimal:b7ea1130,8(12)>)` or something alike, which focuses on its numeric nature. I've never used bigdecimal's address and number of significant digits. Maybe if this is rarely used information it can be avoided in #inspect at all. With such formatting It'll be easier to recognise values in repl, debugger, and especially in test's output/failures. -- 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>