mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 04:07:58 +00:00
[DOC] Add docs for WeakMap#inspect
This commit is contained in:
parent
b21edc1323
commit
068713964a
Notes:
git
2026-01-14 22:09:08 +00:00
11
weakmap.c
11
weakmap.c
@ -207,6 +207,17 @@ wmap_inspect_i(st_data_t k, st_data_t v, st_data_t data)
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
||||
/* call-seq:
|
||||
* inspect -> new_string
|
||||
*
|
||||
* Returns a new string containing the \WeakMap entries:
|
||||
*
|
||||
* m = ObjectSpace::WeakMap.new
|
||||
* m["one"] = 1
|
||||
* m["two"] = 2
|
||||
* m.inspect
|
||||
* # => "#<ObjectSpace::WeakMap:0x00007c457b2523e8: #<String:0x00007c457b2674f0> => 1, #<String:0x00007c457b27b8d8> => 2>"
|
||||
*/
|
||||
static VALUE
|
||||
wmap_inspect(VALUE self)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user