# File lib/ffi/memorypointer.rb, line 26 def self.from_string(s) ptr = self.new(s.bytesize + 1, 1, false) ptr.put_string(0, s) ptr end