diff options
Diffstat (limited to 'lib/sisu/v0/sysenv.rb')
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 25 |
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 |