From: Eric Wong Date: 2015-07-20T03:08:45+00:00 Subject: [ruby-core:70049] Re: [Ruby trunk - Feature #11375] [Open] Decreased Object Allocation in Pathname.rb Looks like you sent a backwards patch. We will need to use -R with patch/git-apply to apply the patch. Relying on "literal".freeze in "when" statements is pointless, case_when_optimizable_literal in compile.c already does that for us :) Other than that, the rest of the (reversed) patch seems mostly alright, do you have benchmarks? Anyways, I tried making this more automatic last year (for common ops such as <<, ==, !=, +, etc) but we did not find significant improvements across the board: https://bugs.ruby-lang.org/issues/10423 + [ruby-core:66127]