Fix memory leak in Ripper.sexp
rb_ast_dispose does not free the rb_ast_t causing it to be leaked. This commit changes it to use rb_ast_free instead.
For example:
require "ripper" 10.times do 100_000.times do Ripper.sexp("") end puts `ps -o rss= -p #{$$}` end
Before:
27648 32512 37376 42240 47232 52224 57344 62208 67072 71936
After:
22784 22784 22784 22784 22912 22912 22912 22912 22912 22912
Fix memory leak in Ripper.sexp
rb_ast_dispose does not free the rb_ast_t causing it to be leaked. This
commit changes it to use rb_ast_free instead.
For example:
Before:
After: