From: Edwin Fine Date: 2006-12-02T17:03:13+09:00 Subject: Re: tk.rb warning in Turtle Graphics (#104) Morton Goldberg wrote: > On Dec 1, 2006, at 7:22 PM, Edwin Fine wrote: > >> /usr/local/lib/ruby/site_ruby/1.8/tk.rb:1187: warning: instance >> variable >> @encoding not initialized >> >> Is it something I am doing wrong, or some other problem? I don't know >> much about Tcl/Tk. > > I'd look into this, but you aren't giving enough info for me to have > a clue as to how to reproduce it. > > OTOH, since it's only a warning, it probably OK to let it go for now > unless you're seeing visible problems such as bad graphic output. > I've seen a number of harmless warnings both from Ruby/Tk and Tk > itself before. > > Regards, Morton Sorry I didn't provide more information earlier; I kind of assumed that other people would have got the warnings, too. Although the warnings are in fact harmless, and the graphics appear to be just fine, it's a bit annoying when you get 27,690 warnings (that's right: 27 thousand plus warnings). These consisted of the following two warnings: /usr/lib/ruby/1.8/tk.rb:2313: warning: redefine encoding= /usr/lib/ruby/1.8/tk.rb:2316: warning: redefine encoding followed by 27,688 repetitions of this warning: /usr/lib/ruby/1.8/tk.rb:1187: warning: instance variable @encoding not initialized All I did was run this command line: ruby turtle_viewer.rb samples/tree.rb The warnings occur for any run of turtle_viewer.rb. Here's my Ruby version: ruby 1.8.4 (2005-12-24) [x86_64-linux] I'm running this on Ubuntu Edgy x86-64. But I get the same warning when I run on a 32-bit RHEL3 system using Ruby 1.8.5, too. I can't post my code (yet) because of the 48-hour deadline, but I can tell you that it does not have the word "encoding" anywhere in it :) I'll investigate further. I was just wondering if anyone else saw this. Thanks. -- Posted via http://www.ruby-forum.com/.