From 868478a6dc0a0ecaeddb333c3b318298cd1b67e8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Nov 2008 13:51:13 -0500 Subject: ruby1.9 some testing minor changes opened to run with ruby1.9, (however not all used libraries ported on system) continue to use ruby1.8 series >= ruby1.8.4 --- bin/sisu | 4 ++-- lib/sisu/v0/concordance.rb | 4 ++-- lib/sisu/v0/constants.rb | 8 ++++---- lib/sisu/v0/html.rb | 2 +- lib/sisu/v0/manifest.rb | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/sisu b/bin/sisu index 164655b4..671a06cd 100644 --- a/bin/sisu +++ b/bin/sisu @@ -1,8 +1,8 @@ #!/usr/bin/env ruby # coding: utf-8 #SiSU: copyright (C) 1997..2008 Ralph Amissah; License GPL, see appended program information -raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' -#raise "Please, use Ruby1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' +#raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' +raise "Please, use Ruby1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' $VERBOSE=nil $KCODE='u' if RUBY_VERSION < '1.9' branch='v0' diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb index babc6655..676aa3a7 100644 --- a/lib/sisu/v0/concordance.rb +++ b/lib/sisu/v0/concordance.rb @@ -121,8 +121,8 @@ WOK end def create head_banner=SiSU_HTML_Format::Head_toc.new(@md) - minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet - toc='
' + minitoc.to_s + '
' + minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet.join("\n") + toc='
' + minitoc + '
' < diff --git a/lib/sisu/v0/constants.rb b/lib/sisu/v0/constants.rb index 414732e1..9339f143 100644 --- a/lib/sisu/v0/constants.rb +++ b/lib/sisu/v0/constants.rb @@ -1,4 +1,4 @@ -# coding:utf-7 +# coding:utf-8 =begin * Name: SiSU @@ -142,9 +142,9 @@ unless RUBY_VERSION < '1.9' Mx[:sm_set_o].force_encoding('utf-8'); Mx[:sm_set_c].force_encoding('utf-8') Mx[:sm_subset_o].force_encoding('utf-8'); Mx[:sm_subset_c].force_encoding('utf-8') # - Rx[:mx_fa_clean].force_encoding('utf-8') - Rx[:lv].force_encoding('utf-8');Rx[:lv_1].force_encoding('utf-8');Rx[:lv_2].force_encoding('utf-8');Rx[:lv_3].force_encoding('utf-8');Rx[:lv_4].force_encoding('utf-8');Rx[:lv_5].force_encoding('utf-8');Rx[:lv_6].force_encoding('utf-8');Rx[:lv_7].force_encoding('utf-8');Rx[:lv_8].force_encoding('utf-8');Rx[:lv_9].force_encoding('utf-8') - Rx[:meta].force_encoding('utf-8') + #Rx[:mx_fa_clean].force_encoding('utf-8') + #Rx[:lv].force_encoding('utf-8');Rx[:lv_1].force_encoding('utf-8');Rx[:lv_2].force_encoding('utf-8');Rx[:lv_3].force_encoding('utf-8');Rx[:lv_4].force_encoding('utf-8');Rx[:lv_5].force_encoding('utf-8');Rx[:lv_6].force_encoding('utf-8');Rx[:lv_7].force_encoding('utf-8');Rx[:lv_8].force_encoding('utf-8');Rx[:lv_9].force_encoding('utf-8') + #Rx[:meta].force_encoding('utf-8') end __END__ consider: diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index df53d1b7..a368ff3d 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -293,7 +293,7 @@ module SiSU_HTML @@toc end def minitoc - minitoc=@@toc[:seg_mini].to_s + minitoc=@@toc[:seg_mini].join("\n") '
' + minitoc + '
' end protected diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb index 22330734..307d9ced 100644 --- a/lib/sisu/v0/manifest.rb +++ b/lib/sisu/v0/manifest.rb @@ -522,7 +522,7 @@ module SiSU_Manifest end def check_output begin - minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet + minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet.join("\n") id,file='','' vz=SiSU_Env::Get_init.instance.skin banner_table=if vz.banner_home_button_only !~ /http:\/\/www\.jus\.uio\.no\/sisu/ \ -- cgit v1.2.3