diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-10 20:09:06 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-10 20:09:06 +0000 |
commit | b02cdfe6bc7f2729df7efb14633a6fb1250e1453 (patch) | |
tree | 1a9fea1c18286ad0a8689df70a75825a0961dcc8 /bootstraptest/test_insns.rb | |
parent | 81607c81b3bc24e4107c65aa8e3541163d066cf7 (diff) | |
download | ruby-b02cdfe6bc7f2729df7efb14633a6fb1250e1453.tar.gz |
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
Diffstat (limited to 'bootstraptest/test_insns.rb')
-rw-r--r-- | bootstraptest/test_insns.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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 |