Project

General

Profile

Actions

Bug #7466

closed

Hashの大きさによってHash#keysでvalueが返ることがある

Added by conceal_rs (Shin-ichiro OGAWA) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-11-29 trunk 37974) [x86_64-linux]
Backport:
[ruby-dev:46658]

Description

=begin
jpmobileのRuby 2.0対応をやっていてわかったのですが、添付のようなHashでkeysの戻り値が途中でvalueになってしまい、それ以降valueが返るようになります。

% ruby -v
ruby 2.0.0dev (2012-11-29 trunk 37974) [x86_64-linux]
% ruby google.rb
[1040450,
(snip)
 1041201,
 "",
 60101,
 60288]

Ruby 2.0 は rbenv install 2.0.0-dev でインストールしました。
=end


Files

google.rb (2.77 KB) google.rb conceal_rs (Shin-ichiro OGAWA), 11/29/2012 04:31 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11352: Sample code Garbage collection dies with an address is T_NONEClosedActions
Actions #2

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

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

This issue was solved with changeset r37991.
Shin-ichiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


compile.c: hash must be paired

  • compile.c (compile_array_): hash elements must be paired even for
    literal elements. [ruby-dev:46658] [Bug #7466]
Actions #3

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Closed to Assigned
Actions #4

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r38000.
Shin-ichiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • compile.c (compile_array_): refix r37991 remove assertion:
    it is true only if type == COMPILE_ARRAY_TYPE_HASH.
    [ruby-dev:46658] [Bug #7466]

  • vm.c (m_core_hash_from_ary): add assertion instead of above.

  • vm.c (m_core_hash_merge_ary): ditto.

Actions #5

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Related to Bug #11352: Sample code Garbage collection dies with an address is T_NONE added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0