* ext/tk/ChangeLog.tkextlib: add log of the modification by
ocean <ocean@ruby-lang.org>. * ext/tk/sample/tkextlib/treectrl/demo.rb: bridge the gap of Hash#index or Hash#key between ruby 1.8 and 1.9 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ad755116ee
commit
011527f455
@ -1,3 +1,8 @@
|
||||
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
|
||||
@ -5,6 +10,15 @@
|
||||
|
||||
* 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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user