diff options
Diffstat (limited to 'tool/ruby_vm/helpers/c_escape.rb')
-rw-r--r-- | tool/ruby_vm/helpers/c_escape.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/ruby_vm/helpers/c_escape.rb b/tool/ruby_vm/helpers/c_escape.rb index 088df1562e..2f73b8889f 100644 --- a/tool/ruby_vm/helpers/c_escape.rb +++ b/tool/ruby_vm/helpers/c_escape.rb @@ -118,3 +118,11 @@ module RubyVM::CEscape }.freeze private_constant :RString2CStr end + +unless defined? ''.b + class String + def b + return dup.force_encoding 'binary' + end + end +end |