diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-05 16:08:45 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-05 16:08:45 +0000 |
| commit | 4d6a1b6d55a498772fa8dda03d9d8820d5946b0e (patch) | |
| tree | a4edc8413a0a6bf8835609d605f999f85504f7ae /ext/tk/tkutil | |
| parent | 830e67dcac4198c2690fdc0ad3a3676d96e69da1 (diff) | |
| download | ruby-4d6a1b6d55a498772fa8dda03d9d8820d5946b0e.tar.gz ruby-4d6a1b6d55a498772fa8dda03d9d8820d5946b0e.tar.xz ruby-4d6a1b6d55a498772fa8dda03d9d8820d5946b0e.zip | |
* ext/tk/tcltklib.c: fix SEGV when embedding to an application.
[ruby-core:7600]
* ext/tk/tcltklib.c: fix SEGV at exit. [ruby-talk:186489]
* ext/tk/tkutil/tkutil.c: follow to changing specification of
instance_eval on ruby-1.9.x.
* ext/tk/lib/tk.rb: ditto.
* ext/tk/lib/multi-tk.rb: ditto.
* ext/tk/lib/tk.rb: remove warning about redefinition of methods.
* ext/tk/lib/tk/variable.rb: remove warning about unseting Tcl
variables.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tkutil')
| -rw-r--r-- | ext/tk/tkutil/tkutil.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 620ac36c1..f4271a724 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -8,10 +8,11 @@ ************************************************/ -#define TKUTIL_RELEASE_DATE "2005-11-07" +#define TKUTIL_RELEASE_DATE "2006-04-06" #include "ruby.h" #include "rubysig.h" +#include "version.h" #include "st.h" static VALUE cMethod; @@ -57,7 +58,13 @@ tk_s_new(argc, argv, klass) { VALUE obj = rb_class_new_instance(argc, argv, klass); - if (rb_block_given_p()) rb_obj_instance_eval(0, 0, obj); + if (rb_block_given_p()) { +#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR <= 8 /* ruby 1.8.x */ + rb_obj_instance_eval(0, 0, obj); +#else + rb_obj_instance_exec(1, &obj, obj); +#endif + } return obj; } |
