From 4cd1cd7201757185e63a5a33181932a6670887ad Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 30 May 2001 09:10:30 +0000 Subject: * ruby.c (proc_options): unexpected SecurityError happens when -T4. * regex.c (re_compile_pattern): * \1 .. \9 should be backreferences always. * regex.c (re_match): backreferences corresponding to unclosed/unmatched parentheses should fail always. * string.c (rb_str_cat): use rb_str_buf_cat() if possible. [new] * string.c (rb_str_append): ditto. * string.c (rb_str_buf_cat): remove unnecessary check (type, taint, modify) to gain performance. * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_finish): removed. * string.c (rb_str_buf_new): buffering string function. [new] * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_cat): ditto. * string.c (rb_str_buf_finish): ditto. * time.c (make_time_t): local time adjustment revised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 47be8fd974..217c76f565 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -665,6 +665,10 @@ module TkPackage include TkCore extend TkPackage + def add_path(path) + Tk::AUTO_PATH.value = Tk::AUTO_PATH.to_a << path + end + def forget(package) tk_call('package', 'forget', package) nil @@ -726,9 +730,6 @@ module Tk TK_LIBRARY = INTERP._invoke("set", "tk_library") LIBRARY = INTERP._invoke("info", "library") - TCL_PACKAGE_PATH = INTERP._invoke("set", "tcl_pkgPath") - AUTO_PATH = tk_split_simplelist(INTERP._invoke("set", "auto_path")) - PLATFORM = Hash[*tk_split_simplelist(INTERP._eval('array get tcl_platform'))] JAPANIZED_TK = (INTERP._invoke("info", "commands", "kanji") != "") @@ -1379,6 +1380,21 @@ class TkVarAccess