[#70977] [Ruby trunk - Feature #11473] Immutable String literal in Ruby 3 — arai@...
Issue #11473 has been updated by Shunichi Arai.
3 messages
2015/10/04
[#70982] limiting scope of magic comments like frozen_string_literal — Eric Wong <normalperson@...>
How about being able to limit the scope of magic comments like
4 messages
2015/10/05
[#71062] [Ruby trunk - Bug #10892] Deadlock in autoload — eregontp@...
Issue #10892 has been updated by Benoit Daloze.
4 messages
2015/10/12
[#71090] Re: [Ruby trunk - Bug #10892] Deadlock in autoload
— Eric Wong <normalperson@...>
2015/10/14
eregontp@gmail.com wrote:
[#71127] [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call — normalperson@...
Issue #11607 has been updated by Eric Wong.
3 messages
2015/10/20
[#71164] [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables — normalperson@...
Issue #11614 has been reported by Eric Wong.
3 messages
2015/10/22
[#71211] [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call — naruse@...
Issue #11607 has been updated by Yui NARUSE.
6 messages
2015/10/27
[#71212] Re: [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call
— Eric Wong <normalperson@...>
2015/10/27
Yes, user must check if the function is MT-safe. Probably fine
[#71246] Re: [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call
— Aaron Patterson <tenderlove@...>
2015/10/28
On Tue, Oct 27, 2015 at 08:54:07AM +0000, Eric Wong wrote:
[#71254] Re: [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call
— Eric Wong <normalperson@...>
2015/10/28
Aaron Patterson <tenderlove@ruby-lang.org> wrote:
[#71230] [Ruby trunk - Feature #11625] Unlock GVL for SHA1 calculations — tenderlove@...
Issue #11625 has been updated by Aaron Patterson.
5 messages
2015/10/27
[#71236] Re: [Ruby trunk - Feature #11625] Unlock GVL for SHA1 calculations
— Юрий Соколов <funny.falcon@...>
2015/10/28
What's about other hashsum algos? MD5, SHA2, etc
[#71242] Re: [Ruby trunk - Feature #11625] Unlock GVL for SHA1 calculations
— Eric Wong <normalperson@...>
2015/10/28
Юрий Соколов <funny.falcon@gmail.com> wrote:
[#71239] [Ruby trunk - Bug #11384] multi-threaded autoload sometimes fails — shugo@...
Issue #11384 has been updated by Shugo Maeda.
4 messages
2015/10/28
[ruby-core:71110] [Ruby trunk - Feature #11599] Dump entries of hash in ObjectSpace
From:
nobu@...
Date:
2015-10-19 06:52:23 UTC
List:
ruby-core #71110
Issue #11599 has been updated by Nobuyoshi Nakada.
That distinction makes no sense.
Non-special-const objects (including `String`) are always shown in pointer reference form.
That `"0x007f8f3c8baf88"` is the content of a string but not the pointer, then it never appears with your patch.
----------------------------------------
Feature #11599: Dump entries of hash in ObjectSpace
https://bugs.ruby-lang.org/issues/11599#change-54481
* Author: Yosi Attias
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
Hi,
*This is my first c code contribution :)*
I am helping developing heap-analyzer (github.com/tenderlove/heap-analyzer), and currently the dumps lacks of "type metadata" information, like:
* Hash entries - the keys and value
* Array items - the items of the array
etc.
In the included patch, I have changed the dump of hash to add entries of hash.
For example, given the next hash:
~~~ruby
hash = {
int_key: 1,
str_key: "This is my string",
inner_hash: { b: 2 }
}
~~~
The dump result (ObjectSpace.dump(hash)) will be:
~~~json
{
"address": "0x007fbc01110340",
"type": "HASH",
"class": "0x007fbc0109b400",
"size": 3,
"entries": [
{
"is_key_address": false,
"key": ":int_key",
"is_value_address": false,
"value": "1"
},
{
"is_key_address": false,
"key": ":str_key",
"is_value_address": true,
"value": "0x007fbc01110390"
},
{
"is_key_address": false,
"key": ":inner_hash",
"is_value_address": true,
"value": "0x007fbc01110368"
}
],
"references": [
"0x007fbc01110390",
"0x007fbc01110368"
],
"memsize": 232,
"flags": {
"wb_protected": true
}
}
~~~
As you can see, I have the "entries" array, where each entry contains: "is_key_address", "is_value_address" - if the key/value are special consts the inspected value will be printed in the "key"/"value" properties, other their address will be print.
Hope you will accept the patch (and I can submit another one for arrays),
Yosi.
---Files--------------------------------
objspace_dump_hash_entries.patch (4.8 KB)
--
https://bugs.ruby-lang.org/