From 4c36cadd7fef8b4bbdb0f423bdc4b7c7365d5699 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 5 Feb 2008 05:02:54 +0000 Subject: ruby 1.9 open; future pgsql testing on 8.3; encoding utf-8 checks; version bump 0.65.0 * ruby 1.9 use opened, testing required * db sql pgsql future testing on version 8.3 * encoding utf-8 some compatibility checks --- lib/sisu/v0/sysenv.rb | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v0/sysenv.rb') diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 28dc088b..fb3daefe 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -1201,9 +1201,16 @@ WOK "#{source_file_path}/#{file}" end def read_source_file(fns) - fns_array=unless fns =~/\.ssm.sst$/ - IO.readlines(fns,'') - else IO.readlines("#{path.composite_file}/#{fns}",'') + fns_array=if RUBY_VERSION < '1.9' + x=unless fns =~/\.ssm.sst$/ + IO.readlines(fns,'') + else IO.readlines("#{path.composite_file}/#{fns}",'') + end + else #ruby version >= '1.9' + x=unless fns =~/\.ssm.sst$/ + IO.readlines(fns,'r:utf-8') + else IO.readlines("#{path.composite_file}/#{fns}",'r:utf-8') + end end end def path #dir @@ -3124,3 +3131,15 @@ module SiSU_Errors end __END__ https? intro check 2007-09-22 + +fns_array=unless fns =~/\.ssm.sst$/ + if RUBY_VERSION < '1.9' + IO.readlines(fns,'') + else IO.readlines(fns,'r:utf-8') + end +else + if RUBY_VERSION < '1.9' + IO.readlines("#{path.composite_file}/#{fns}",'') + else IO.readlines("#{path.composite_file}/#{fns}",'r:utf-8') + end +end -- cgit v1.2.3