Project

General

Profile

Bug #7466

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

Added by conceal_rs (Shin-ichiro OGAWA) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-11-29 trunk 37974) [x86_64-linux]
[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

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

Related issues

Related to Ruby trunk - Bug #11352: Sample code Garbage collection dies with an address is T_NONEClosed

Associated revisions

Revision 37991
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

compile.c: hash must be paired

  • compile.c (compile_array_): hash elements must be paired even for literal elements. [Bug #7466]

Revision 37991
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

compile.c: hash must be paired

  • compile.c (compile_array_): hash elements must be paired even for literal elements. [Bug #7466]

Revision 37991
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

compile.c: hash must be paired

  • compile.c (compile_array_): hash elements must be paired even for literal elements. [Bug #7466]

Revision 37991
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

compile.c: hash must be paired

  • compile.c (compile_array_): hash elements must be paired even for literal elements. [Bug #7466]

Revision 38000
Added by naruse (Yui NARUSE) almost 5 years ago

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

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

  • vm.c (m_core_hash_merge_ary): ditto.

Revision 38000
Added by naruse (Yui NARUSE) almost 5 years ago

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

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

  • vm.c (m_core_hash_merge_ary): ditto.

Revision 38000
Added by naruse (Yui NARUSE) almost 5 years ago

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

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

  • vm.c (m_core_hash_merge_ary): ditto.

Revision 38000
Added by naruse (Yui NARUSE) almost 5 years ago

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

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

  • vm.c (m_core_hash_merge_ary): ditto.

History

#2 Updated by nobu (Nobuyoshi Nakada) almost 5 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. [Bug #7466]

#3 Updated by naruse (Yui NARUSE) almost 5 years ago

  • Status changed from Closed to Assigned

#4 Updated by naruse (Yui NARUSE) almost 5 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.
    [Bug #7466]

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

  • vm.c (m_core_hash_merge_ary): ditto.

#5 Updated by nobu (Nobuyoshi Nakada) over 2 years ago

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

Also available in: Atom PDF