Module: PhusionPassenger::Utils

Included in:
AbstractRequestHandler, AbstractServer, AbstractServerCollection, AnalyticsLogger, ClassicRails::ApplicationSpawner, ClassicRails::ApplicationSpawner, ClassicRails::FrameworkSpawner, MessageClient, Rack::ApplicationSpawner, Rack::ApplicationSpawner, SpawnManager, WSGI::ApplicationSpawner
Defined in:
lib/phusion_passenger/utils.rb,
lib/phusion_passenger/utils/tmpdir.rb,
lib/phusion_passenger/utils/rewindable_input.rb,
lib/phusion_passenger/utils/unseekable_socket.rb,
lib/phusion_passenger/utils/hosts_file_parser.rb,
lib/phusion_passenger/utils/file_system_watcher.rb

Overview

Utility functions.

Defined Under Namespace

Classes: HostsFileParser, PseudoIO, RewindableInput, UnseekableSocket

Constant Summary

NULL =
"\0".freeze
FileSystemWatcher =
NativeSupport::FileSystemWatcher
@@passenger_tmpdir =
nil

Instance Method Summary collapse

Instance Method Details

#split_by_null_into_hash(data) ⇒ Object

Split the given string into an hash. Keys and values are obtained by splitting the string using the null character as the delimitor.



847
848
849
850
851
# File 'lib/phusion_passenger/utils.rb', line 847

def split_by_null_into_hash(data)
	args = data.split(NULL, -1)
	args.pop
	return Hash[*args]
end