diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-30 15:43:42 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-30 15:43:42 +0000 |
commit | da228255d17ce6fb1dd1f0db49473a6eda741ee2 (patch) | |
tree | 414b552a15b449d8606d367d033ecaac1cb2cca6 /ext | |
parent | 44642eb3d6901993f4fd42dd7ee93894182e542d (diff) | |
download | ruby-da228255d17ce6fb1dd1f0db49473a6eda741ee2.tar.gz ruby-da228255d17ce6fb1dd1f0db49473a6eda741ee2.tar.xz ruby-da228255d17ce6fb1dd1f0db49473a6eda741ee2.zip |
* sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat
Japanese (i18n?) filenames.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/ChangeLog.tkextlib | 5 | ||||
-rw-r--r-- | ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 83e948edd..34954ebaa 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,3 +1,8 @@ +2005-03-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + + * sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat + Japanese (i18n?) filenames. + 2005-03-30 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * sample/tkextlib/bwidget/tree.rb: use 'return' in the Proc object. diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb index c83ae3724..9e4417669 100644 --- a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb +++ b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb @@ -3,11 +3,11 @@ require 'tk' require 'tkextlib/iwidgets' def get_files(file) - dir = (file.empty?)? ENV['HOME'] : file + dir = (file.empty?)? ENV['HOME'] : TkComm._fromUTF8(file) Dir.chdir(dir) rescue return '' - rlist = [] - Dir['*'].sort.each{|f| rlist << File.join(dir, f) } - rlist + Dir['*'].sort.collect{|f| + TkCore::INTERP._merge_tklist(TkComm._toUTF8(File.join(dir, f))) + } end Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)}, |