From: Lorenzo Jorquera Date: 2004-12-30T05:52:28+09:00 Subject: Re: irb issue --0-1638950864-1104353540=:86087 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Luis Be aware that in your first assignement (String = 2) you are destroying the String class, and after that you can�t create more strings via String.new (if you try writing String.new after String = 2 you will get the same error). I guess the irb parser is crashing because it is trying to create a string. Lu�s Miguel Louren�o wrote: Hello, I'm not sure if this is a bug but I've stumbled across some strange behaviour in irb. I've tried looking at http://www.ruby-lang.org/cgi-bin/ruby-bugs but I get a 404. If I do something like "String = 2" two times in a row in irb it crashes: [lml@null:~/Documents/Code/ruby/mm/code] irb irb(main):001:0> String = 2 (irb):1: warning: already initialized constant String => 2 irb(main):002:0> String = 2 /usr/local/lib/ruby/1.8/irb/ruby-token.rb:101:in `Token': undefined method `ancestors' for "=":String (NoMethodError) from /usr/local/lib/ruby/1.8/irb/ruby-lex.rb:390:in `lex_init' ... [lml@null:~/Documents/Code/ruby/mm/code] irb --version irb 0.9(02/07/03) [lml@null:~/Documents/Code/ruby/mm/code] ruby --version ruby 1.8.2 (2004-11-03) [powerpc-darwin7.5.0] Lu�s Miguel Louren�o --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am�rica Latina y el resto del Mundo. Vis�ta Yahoo! Noticias. --0-1638950864-1104353540=:86087--