From 568f8adfc884d1897eca56c8b6c0ec0018cf3816 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 10 Mar 2017 20:09:06 +0000 Subject: compile.c: apply opt_str_freeze to String#-@ (uminus) The same optimization used for "literal string".freeze can easily apply to uminus without introducing any compatibility problems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_insns.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_insns.rb b/bootstraptest/test_insns.rb index 2001e2c0ef..3a6e677885 100644 --- a/bootstraptest/test_insns.rb +++ b/bootstraptest/test_insns.rb @@ -178,6 +178,7 @@ tests = [ }, [ 'opt_str_freeze', %q{ 'true'.freeze }, ], + [ 'opt_str_freeze', %q{ -'true' }, ], [ 'opt_str_freeze', <<~'},', ], # { class String def freeze -- cgit v1.2.3