Public bug reported:
Binary package hint: ruby1.9
Ubuntu release: Karmic
Package version: 1.9.0.5-1ubuntu
I expected the Ruby/Tk test script at the end to run the same as under
Ruby1.8 and Ruby1.9.1. Instead, it came back with the message:
ruby1.9 ./crash19a.rb
./crash19a.rb:12:in `block (3 levels) in <main>': undefined method
`yscrollcommand' for nil:NilClass (NoMethodError)
from ./crash19a.rb:9:in `new'
from ./crash19a.rb:9:in `block (2 levels) in <main>'
from /usr/lib/ruby/1.9.0/tk/text.rb:262:in `instance_eval'
from /usr/lib/ruby/1.9.0/tk/text.rb:262:in `new'
from ./crash19a.rb:8:in `block in <main>'
from ./crash19a.rb:7:in `new'
from ./crash19a.rb:7:in `<main>'
This is the test script:
#!/usr/bin/ruby
require 'tk'
root = TkRoot.new()
t = TkToplevel.new( root ) { |tl|
TkText.new( tl ) { |tx|
TkScrollbar.new( tl ) { |s|
pack( 'side' => 'right', 'fill' => 'y' )
command proc{ |*args| t.yview(*args) }
tx.yscrollcommand proc{ |first, last| s.set first, last }
}
pack( 'expand'=>'yes', 'fill'=>'both' )
insert( '0.0', "This window is a text widget." )
}
TkButton.new( tl ) {
text 'Leave'
command proc{ tl.withdraw; root.focus }
pack
}
withdraw
}
TkButton.new( root ) {
text 'Popup'
command proc{ t.deiconify }
pack
}
TkButton.new( root ) {
text 'Quit'
command proc{ root.destroy }
pack
}
Tk.mainloop
** Affects: ruby1.9 (Ubuntu)
Importance: Undecided
Status: New
--
undefined method `yscrollcommand' for nil:NilClass (NoMethodError)
https://bugs.launchpad.net/bugs/511339
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs