diff options
Diffstat (limited to 'ext/tk/lib/tk/variable.rb')
-rw-r--r-- | ext/tk/lib/tk/variable.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/tk/lib/tk/variable.rb b/ext/tk/lib/tk/variable.rb index 982182c2a8..cdf6441b6d 100644 --- a/ext/tk/lib/tk/variable.rb +++ b/ext/tk/lib/tk/variable.rb @@ -1545,14 +1545,15 @@ class TkVarAccess<TkVariable end end - module Tk begin + INTERP._invoke_without_enc('global', 'auto_path') auto_path = INTERP._invoke('set', 'auto_path') - rescue + rescue => e begin + INTERP._invoke_without_enc('global', 'env') auto_path = INTERP._invoke('set', 'env(TCLLIBPATH)') - rescue + rescue => e auto_path = Tk::LIBRARY end end |