* gc.c (wmap_inspect_i): fix callback argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
936b96e9b7
commit
24b97da7ef
4
gc.c
4
gc.c
@ -5273,8 +5273,7 @@ struct wmap_iter_arg {
|
|||||||
static int
|
static int
|
||||||
wmap_inspect_i(st_data_t key, st_data_t val, st_data_t arg)
|
wmap_inspect_i(st_data_t key, st_data_t val, st_data_t arg)
|
||||||
{
|
{
|
||||||
struct wmap_iter_arg *args = (struct wmap_iter_arg *)arg;
|
VALUE str = (VALUE)arg;
|
||||||
VALUE str = args->value;
|
|
||||||
VALUE k = (VALUE)key, v = (VALUE)val;
|
VALUE k = (VALUE)key, v = (VALUE)val;
|
||||||
|
|
||||||
if (RSTRING_PTR(str)[0] != '#') {
|
if (RSTRING_PTR(str)[0] != '#') {
|
||||||
@ -5305,6 +5304,7 @@ wmap_inspect(VALUE self)
|
|||||||
st_foreach(w->obj2wmap, wmap_inspect_i, str);
|
st_foreach(w->obj2wmap, wmap_inspect_i, str);
|
||||||
}
|
}
|
||||||
RSTRING_PTR(str)[0] = '#';
|
RSTRING_PTR(str)[0] = '#';
|
||||||
|
rb_str_cat2(str, ">");
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user