mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
hash.c (mrb_hash_to_s): put spaces around =>
CRuby 3.4 puts spaces around `=>` since for example `{:a!=>2}` can be
confusing where to separate tokens. mruby should follow the behavior.
Many tests in `test/t` directory assumed no spaces around `=>`, so we
needed to fix them too.
This commit is contained in:
+1
-1
@@ -1843,7 +1843,7 @@ mrb_hash_to_s(mrb_state *mrb, mrb_value self)
|
||||
mrb_str_cat_str(mrb, ret, mrb_inspect(mrb, entry->key));
|
||||
});
|
||||
mrb_gc_arena_restore(mrb, ai);
|
||||
mrb_str_cat_lit(mrb, ret, "=>");
|
||||
mrb_str_cat_lit(mrb, ret, " => ");
|
||||
h_check_modified(mrb, h, {
|
||||
mrb_str_cat_str(mrb, ret, mrb_inspect(mrb, entry->val));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user