Project

General

Profile

Bug #1537

The Feature of Hash#to_s was Changed

Added by ujihisa (Tatsuhiro Ujihisa) over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-05-29 trunk 23604) [i386-darwin9.7.0]
Backport:
[ruby-dev:38555]

Description

=begin
r23604で、Hash#to_sの仕様が以下のように変わりましたが、これは意図的なものですか?

[before] Hashの各keyとvalueをinspectしたものを{}内にまとめる
{'' => ''}.to_s #=> '{""=>""}'

[after] Hashの各keyとvalueをto_sしたものを{}内にまとめる
{'' => ''}.to_s #=> '{=>}'

# r23604のhash.cへの修正を参考にr23324での若干の低速化を改善しようとarray.cを修正しようとする過程で上記変更点に気づきました。

参考: http://redmine.ruby-lang.org/issues/show/1533
=end

History

#1

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23605.
=end

Also available in: Atom PDF