Make Hash#inspect safety in recursive #620

wants to merge 1 commit into


None yet

5 participants


Hash#inspect is unsafety.

$ ./bin/mruby -e 'h = {}; h[:h]=h; puts h'
     [1] (unknown):-1:in Kernel#puts
     [0] -e:1

I know that this issue has been discussed in #57, but I'd like mruby to be safety.


@matz It's seems like good. What's the problem?


i get arena overflow on latest repo.

> h = {}; h[:h]=h; puts h
RuntimeError: arena overflow error
mruby member

If it helps, it looks like a difference between the mruby and mirb tools. If you go back to the commit that this was taken from 57482ef and try mirb you get the same arena overflow error. If you try today's mruby you will get a slightly different error message than above but not the overflow error.


please close This PR.

$ mruby -e 'h = {}; h[:h]=h; puts h'
@tricknotes tricknotes closed this Dec 26, 2015
@tricknotes tricknotes deleted the tricknotes:safety-hash-inspect branch Dec 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment