diff --git a/ChangeLog b/ChangeLog index 74fc39079d..5a796b4d15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Jun 27 22:47:18 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: forgot to update TCLTKLIB_RELEASE_DATE. + + * ext/tk/lib/tk.rb (tk_tcl2ruby): [bug fix] somtimes fail to convert + a tcl string to a ruby object if the tcl string includes "\n". + Tue Jun 27 16:04:05 2006 WATANABE Hirofumi * win32/win32.h: define isascii on MinGW for msvcrt compatibility. diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 45468a3bfd..c80dc45ea5 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -209,17 +209,17 @@ module TkComm # return val.split.collect{|v| tk_tcl2ruby(v)} #end case val - when /^@font/ + when /\A@font\S+\z/ TkFont.get_obj(val) - when /^-?\d+$/ + when /\A-?\d+\z/ val.to_i - when /^\./ + when /\A\.\S*\z/ #Tk_WINDOWS[val] ? Tk_WINDOWS[val] : _genobj_for_tkwidget(val) TkCore::INTERP.tk_windows[val]? TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val) - when /^i(_\d+_)?\d+$/ + when /\Ai(_\d+_)?\d+\z/ TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val - when /^-?\d+\.?\d*(e[-+]?\d+)?$/ + when /\A-?\d+\.?\d*(e[-+]?\d+)?\z/ val.to_f when /\\ / val.gsub(/\\ /, ' ') @@ -4559,7 +4559,7 @@ end #Tk.freeze module Tk - RELEASE_DATE = '2006-04-18'.freeze + RELEASE_DATE = '2006-06-27'.freeze autoload :AUTO_PATH, 'tk/variable' autoload :TCL_PACKAGE_PATH, 'tk/variable' diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index 0505dfd1a5..00c7e658c5 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -4,7 +4,7 @@ * Oct. 24, 1997 Y. Matsumoto */ -#define TCLTKLIB_RELEASE_DATE "2006-04-25" +#define TCLTKLIB_RELEASE_DATE "2006-06-26" #include "ruby.h" #include "rubysig.h"