aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-02-05 23:50:34 +0000
committerRalph Amissah <ralph@amissah.com>2008-02-05 23:50:34 +0000
commitad21750ba3c44303d0c2ad91269771605612a8e6 (patch)
treefb1c5ce2737a1cf04069e409563e20540dcea9ff /lib/sisu/v0/sysenv.rb
parentUpdated sisu-0.64.2 (diff)
parentversion rolled back, not ready to open ruby 1.9 some libraries not yet available (diff)
Merge branch 'upstream' into debian/sid
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