From cffaeb8176a29f506cfd4b07a5ae3238886a93e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 18 Jun 2021 10:17:55 -0400 Subject: ruby3, code runs (check output) --- org/db.org | 2 +- org/env.org | 11 +++++++---- org/utils.org | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'org') diff --git a/org/db.org b/org/db.org index 4a2f216b..5343a464 100644 --- a/org/db.org +++ b/org/db.org @@ -1512,7 +1512,7 @@ module SiSU_DbImport if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) - puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} + puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@cX.off}} end end ################ CLEAR ############## diff --git a/org/env.org b/org/env.org index fafc90ef..36017be7 100644 --- a/org/env.org +++ b/org/env.org @@ -20,8 +20,8 @@ #+BEGIN_SRC ruby :tangle "../lib/sisu/se.rb" # <> -@@cX=nil module SiSU_Env + #@@cX=nil require_relative 'constants' # constants.rb require_relative 'utils' # utils.rb require_relative 'se_date' # se_date.rb @@ -4490,8 +4490,8 @@ consider running as separate objects #+BEGIN_SRC ruby :tangle "../lib/sisu/se_info_env.rb" # <> -@@current_document=Dir.pwd #nil #'' module SiSU_Info_Env + @@current_document=Dir.pwd #nil #'' require_relative 'se_envcall' # se_envcall.rb require_relative 'html_parts' # html_parts.rb begin @@ -8305,8 +8305,8 @@ __END__ #+BEGIN_SRC ruby :tangle "../lib/sisu/se_standardise_lang.rb" # <> -@@lang_info=nil module SiSU_Standardise_Lang + @@lang_info=nil class StandardiseLanguage require_relative 'i18n' # i18n.rb def initialize(l='') @@ -8486,7 +8486,10 @@ module SiSU_Info_Version version_details_hash[:version] end def version_major - @version_major=version_details_hash[:version].gsub(/([0-9]+)\.[0-9]+\.[0-9]+/,'\1') + @version_major=if (version_details_hash[:version]) + version_details_hash[:version].gsub(/([0-9]+)\.[0-9]+\.[0-9]+/,'\1') + else "" + end end def install_method version_details_hash[:install_method] diff --git a/org/utils.org b/org/utils.org index e709bcfe..cb0a1e65 100644 --- a/org/utils.org +++ b/org/utils.org @@ -392,7 +392,7 @@ module SiSU_Screen def initialize(color_state,*txt) @color_state,@txt=color_state,txt @color_instruct=txt[0] - @cX=@@cX=if color_state==:on + @cX=if color_state==:on Color.new do self.off=self.white=self.white_bold=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuchsia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuchsia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black='' end -- cgit v1.2.3