1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tk/lib/tk.rb: When CHILDKILLED and so on, Tk.errorCode returns

a Fixnum for 2nd element (it's pid) of the return value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-10-07 08:38:03 +00:00
parent 607314595a
commit 046d4e7ee1
2 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Thu Oct 7 17:36:25 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: When CHILDKILLED and so on, Tk.errorCode returns
a Fixnum for 2nd element (it's pid) of the return value.
Thu Oct 7 12:55:04 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (io_read): should freeze buffer before thread context

View file

@ -1614,7 +1614,16 @@ module Tk
def Tk.errorCode
INTERP._invoke_without_enc('global', 'errorCode')
tk_split_simplelist(INTERP._invoke_without_enc('set', 'errorCode'))
code = tk_split_simplelist(INTERP._invoke_without_enc('set', 'errorCode'))
case code[0]
when 'CHILDKILLED', 'CHILDSTATUS', 'CHILDSUSP'
begin
pid = Integer(code[1])
code[1] = pid
rescue
end
end
code
end
def root