From: shyouhei@... Date: 2017-03-13T15:28:39+00:00 Subject: [ruby-core:80140] [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) Issue #13295 has been updated by shyouhei (Shyouhei Urabe). We looked at this issue in today's developer meeting. Koichi pointed out that you have to consider redefinition of String#-@. You need to take care about such situation, like we do already for #freeze. ---------------------------------------- Feature #13295: [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) https://bugs.ruby-lang.org/issues/13295#change-63568 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- The same optimization used for "literal string".freeze can easily apply to uminus without introducing any compatibility problems. I can't think of any problems this would introduce, but I'll wait a few days for feedback before committing. ---Files-------------------------------- 0001-compile.c-apply-opt_str_freeze-to-String-uminus.patch (1.47 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: