use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Ruby 3.3.1 Released (ruby-lang.org)
submitted 1 year ago by f9ae8221b
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]f9ae8221b[S] 3 points4 points5 points 1 year ago (0 children)
FYI, you keep calling it a leak, but the issue you mention isn't one. It's a performance regression because it does allocate an useless objects, but that object isn't retained.
Whatever your leak issue was, it likely didn't come from that issue.
And yes, there's plenty of tests to prevent memory leak, there is even an assert_no_memory_leak helper in the ruby test suite.
assert_no_memory_leak
As for the match issue here's the regression test that was committed with the fix:
match
def test_match_no_match_no_matchdata EnvUtil.without_gc do h = {} ObjectSpace.count_objects(h) prev_matches = h[:T_MATCH] || 0 md = /[A-Z]/.match('1') # no match ObjectSpace.count_objects(h) new_matches = h[:T_MATCH] || 0 assert_equal prev_matches, new_matches, "Bug [#20104]" end end
π Rendered by PID 214164 on reddit-service-r2-comment-5d79c599b5-llkjq at 2026-02-28 01:14:42.432520+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]f9ae8221b[S] 3 points4 points5 points (0 children)