aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-02-05 05:02:54 +0000
committerRalph Amissah <ralph@amissah.com>2008-02-05 05:02:54 +0000
commit4c36cadd7fef8b4bbdb0f423bdc4b7c7365d5699 (patch)
tree5e8d5017242f98cf516999e189d0616a479c7b0d /lib/sisu/v0/sysenv.rb
parentfor update replace LIKE with '=' ; required by pg8.3 bigint (diff)
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
Diffstat (limited to 'lib/sisu/v0/sysenv.rb')
-rw-r--r--lib/sisu/v0/sysenv.rb25
1 files changed, 22 insertions, 3 deletions
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