aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-05-05 22:09:45 -0400
committerRalph Amissah <ralph@amissah.com>2011-05-05 22:09:48 -0400
commit8b7a793a7752bf7c562fc19e3bf9f05bfcdc7a64 (patch)
tree756f39fe59584723713c41c1defe9976a9062942 /lib/sisu/v3/sysenv.rb
parentv3: date, version, changelog (diff)
v3: i18n, sysenv, class variable to prevent unnecessary re-construction of hashsisu_3.0.8
* prevent program from becoming as slow as treacle, a fix
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index f757233f..a1c6228b 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -58,6 +58,7 @@
=end
@@cX=nil
@@current_document=Dir.pwd #nil #''
+@@lang_info=nil
module SiSU_Env
require_relative 'constants' # constants.rb
require 'fileutils'
@@ -800,7 +801,7 @@ module SiSU_Env
@lang_info=SiSU_i18n::Languages.new
end
def lang_lst # from i18n
- @lang_info.language.list
+ @@lang_info ||=@lang_info.language.list
end
def lang(l='') # from i18n
x=if l =~/^#{@r}$/