diff options
-rw-r--r-- | ext/tk/ChangeLog.tkextlib | 14 | ||||
-rw-r--r-- | ext/tk/sample/tkextlib/treectrl/demo.rb | 10 |
2 files changed, 22 insertions, 2 deletions
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 843023de5a..da54bddc79 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,10 +1,24 @@ 2005-04-01 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + * sample/tkextlib/treectrl/demo.rb: bridge the gap of + Hash#index or Hash#key between ruby 1.8 and 1.9 + +2005-04-01 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + * lib/tkextlib/blt/component.rb: bug fix on treatment of component objects. * sample/tkextlib/blt/graph6.rb: a new sample script. +2005-03-31 ocean <ocean@ruby-lang.org> + + * ext/tk/sample/tkextlib/treectrl/demo.rb: should use Hash#index. + + * ext/tk/sample/tkextlib/treectrl/demo.rb: TkImage was not + cached properly. + + * ext/tk/sample/tkextlib/treectrl/random.rb: fixed typo. + 2005-03-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * sample/tkextlib/iwidgets/sample/hierarchy.rb: show basename diff --git a/ext/tk/sample/tkextlib/treectrl/demo.rb b/ext/tk/sample/tkextlib/treectrl/demo.rb index 892b5a62c7..aaa6b2612b 100644 --- a/ext/tk/sample/tkextlib/treectrl/demo.rb +++ b/ext/tk/sample/tkextlib/treectrl/demo.rb @@ -7,8 +7,14 @@ $ScriptDir = File.dirname(File.expand_path(__FILE__)) $HasColumnCreate = Tk::TreeCtrl::HasColumnCreateCommand -class Hash - alias key index +if Hash.instance_methods.include?('key') + # probably ruby 1.9.x --> use Hash#key + # Because Hash#index show warning "Hash#index is deprecated; use Hash#key". +else + # probably ruby 1.8.x --> use Hash#index + class Hash + alias key index + end end class TkTreeCtrl_demo |