summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/helpers
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-10 11:49:50 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-07-13 08:56:18 +0900
commit9721f477c7f33d64af94fad4a1ca51f739b0b08f (patch)
tree14330998f33e9040a7038b80899098c016a26241 /tool/ruby_vm/helpers
parentf66e0212efe4f6572d5e81741e831ab735cc2fee (diff)
inline Primitive.cexpr!
We can obtain the verbatim source code of Primitive.cexpr!. Why not paste that content into the JITed program.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3305
Diffstat (limited to 'tool/ruby_vm/helpers')
-rw-r--r--tool/ruby_vm/helpers/c_escape.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/helpers/c_escape.rb b/tool/ruby_vm/helpers/c_escape.rb
index 3e2bf2e02c..fa3cb8b1aa 100644
--- a/tool/ruby_vm/helpers/c_escape.rb
+++ b/tool/ruby_vm/helpers/c_escape.rb
@@ -46,7 +46,7 @@ module RubyVM::CEscape
# I believe this is the fastest implementation done in pure-ruby.
# Constants cached, gsub skips block evaluation, string literal optimized.
buf = str.b
- buf.gsub! %r/./n, RString2CStr
+ buf.gsub! %r/./nm, RString2CStr
return %'"#{buf}"'
end