Module: Ethon::Easy::Util Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
This module contains small helpers.
Instance Method Summary collapse
-
#escape_zero_byte(value) ⇒ String, Object
private
Escapes zero bytes in strings.
Instance Method Details
#escape_zero_byte(value) ⇒ String, Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Escapes zero bytes in strings.
20 21 22 23 |
# File 'lib/ethon/easy/util.rb', line 20 def escape_zero_byte(value) return value unless value.to_s.include?(0.chr) value.to_s.gsub(0.chr, '\\\0') end |