diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 05:23:54 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 05:23:54 +0000 |
commit | 46bf6217378e0dca4ff56446cf7233023f21778a (patch) | |
tree | 034d9e3ed468898636d9e4fd68e14d083745cccc /ext | |
parent | 06f82d38838e3d588c96e12bf492b685ff1d8322 (diff) | |
download | ruby-46bf6217378e0dca4ff56446cf7233023f21778a.tar.gz |
* eval.c (ruby_init): set ruby_running to true after
initialization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/lib/tk.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index b9280e2901..22489dc1b0 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -324,7 +324,7 @@ module TkComm return '' if cmd == '' id = _next_cmd_id Tk_CMDTBL[id] = cmd - @cmdtbl = [] unless @cmdtbl + @cmdtbl = [] unless defined? @cmdtbl @cmdtbl.push id return format("rb_out %s", id); end @@ -859,10 +859,6 @@ module TkCore tk_call 'tk_getSaveFile', *hash_kv(keys) end - def chooseDirectory(keys = nil) - tk_call 'tk_chooseDIrectory', *hash_kv(keys) - end - def chooseColor(keys = nil) tk_call 'tk_chooseColor', *hash_kv(keys) end @@ -1385,7 +1381,7 @@ if /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK attr_accessor :encoding def _eval(cmd) - if @encoding + if defined? @encoding _fromUTF8(__eval(_toUTF8(cmd, @encoding)), @encoding) else __eval(cmd) @@ -1393,7 +1389,7 @@ if /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK end def _invoke(*cmds) - if @encoding + if defined? @encoding cmds = cmds.collect{|cmd| _toUTF8(cmd, @encoding)} _fromUTF8(__invoke(*cmds), @encoding) else @@ -1505,8 +1501,6 @@ class TkBindTag } end - ALL = self.new_by_name('all') - def initialize(*args, &b) @id = Tk_BINDTAG_ID[0] Tk_BINDTAG_ID[0] = Tk_BINDTAG_ID[0].succ @@ -1514,6 +1508,8 @@ class TkBindTag bind(*args, &b) if args != [] end + ALL = self.new_by_name('all') + def name @id end |