lib/systemu.rb in systemu-2.3.0 vs lib/systemu.rb in systemu-2.3.1

- old
+ new

@@ -11,11 +11,11 @@ class SystemUniversal # # constants # - SystemUniversal::VERSION = '2.3.0' unless SystemUniversal.send(:const_defined?, :VERSION) + SystemUniversal::VERSION = '2.3.1' unless SystemUniversal.send(:const_defined?, :VERSION) def SystemUniversal.version() SystemUniversal::VERSION end def version() SystemUniversal::VERSION end # # class methods # @@ -23,11 +23,11 @@ @host = Socket.gethostname @ppid = Process.ppid @pid = Process.pid @turd = ENV['SYSTEMU_TURD'] - c = ::Config::CONFIG + c = begin; ::RbConfig::CONFIG; rescue NameError; ::Config::CONFIG; end ruby = File.join(c['bindir'], c['ruby_install_name']) << c['EXEEXT'] @ruby = if system('%s -e 42' % ruby) ruby else system('%s -e 42' % 'ruby') ? 'ruby' : warn('no ruby in PATH/CONFIG') @@ -171,11 +171,9 @@ def child_program config <<-program PIPE = STDOUT.dup begin - require 'yaml' - config = Marshal.load(IO.read('#{ config }')) argv = config['argv'] env = config['env'] cwd = config['cwd']