[FWD from comp.lang.ruby] Re: BUG in tk (preview 6)?

This message apparently don't go in the mailing-list. I forward it with
the authorization of the author

Hello,
even in preview 6 it's not possible to use titles for a tk rootwindow:

root = TkRoot.new {title "foo"}

generates a mainwindow with just "tk" as title. Enviroment: win32.

Any suggestions?

Thanx

Eric.

The minimal example is :

svg% cat b.rb
#!/usr/bin/ruby
class A
   def a
      warn "ok" if block_given?
   end
end

class B < A
   attr_accessor :b

   def a
      self.b = super
   end
end

B.new.a {}
svg%

svg% b.rb
svg%

The problem is in NODE_ATTRASGN ({BEGIN,END}_CALLARGS)

···

--

Guy Decoux

Hi,

···

In message “[FWD from comp.lang.ruby] Re: BUG in tk (preview 6)?” on 03/08/01, ts decoux@moulon.inra.fr writes:

The problem is in NODE_ATTRASGN ({BEGIN,END}_CALLARGS)

Wow, I was surprised a basic bug like this survives that long.
Thank you for finding it.

						matz.

Hi,

···

At Fri, 1 Aug 2003 01:33:11 +0900, ts wrote:

The problem is in NODE_ATTRASGN ({BEGIN,END}_CALLARGS)

Not only in it, but also in NODE_[FV]?CALL.

Index: eval.c

RCS file: /cvs/ruby/src/ruby/eval.c,v
retrieving revision 1.497
diff -u -2 -p -r1.497 eval.c
— eval.c 28 Jul 2003 07:31:49 -0000 1.497
+++ eval.c 1 Aug 2003 03:00:43 -0000
@@ -5236,5 +5244,5 @@ rb_call_super(argc, argv)
}

  • PUSH_ITER(ruby_iter->iter?ITER_PRE:ITER_NOT);
  • PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
    result = rb_call(RCLASS(klass)->super, self, ruby_frame->orig_func, argc, argv, 3);
    POP_ITER();


Nobu Nakada

Hi,

···

In message “Re: [FWD from comp.lang.ruby] Re: BUG in tk (preview 6)?” on 03/08/01, nobu.nokada@softhome.net nobu.nokada@softhome.net writes:

At Fri, 1 Aug 2003 01:33:11 +0900, >ts wrote:

The problem is in NODE_ATTRASGN ({BEGIN,END}_CALLARGS)

Not only in it, but also in NODE_[FV]?CALL.

I made my own fix, but yours seems better. Could you commit the fix?

						matz.