From: "Schwarze (Matthias Schwarze)" Date: 2012-08-21T03:52:50+09:00 Subject: [ruby-core:47253] [ruby-trunk - Bug #6899][Open] Flip flop operator broken in IRB (1.9.3, win/osx) Issue #6899 has been reported by Schwarze (Matthias Schwarze). ---------------------------------------- Bug #6899: Flip flop operator broken in IRB (1.9.3, win/osx) https://bugs.ruby-lang.org/issues/6899 Author: Schwarze (Matthias Schwarze) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0] IRB *sometimes* fails with "NotImplementedError: method `eql?' called on hidden T_STRING object" When running this code in IRB, you either get the correct bunch of "345..." or you get the error message above: 2000.times do 20.times do |x| print x if x==3..x==5 end end You may have to repeat the command several times to get the error! This does not seem to happen when running this as a script with ruby - just with IRB! Fresh install of ruby 1.9.3p194 (windows 7: OneClickInstaller / OSX: RVM) No gems installed or loaded! Full stack trace: NotImplementedError: method `eql?' called on hidden T_STRING object (0x007f9fd18f2460 flags=0x2805 klass=0x0) from (irb):46:in `block (2 levels) in irb_binding' from (irb):46:in `times' from (irb):46:in `block in irb_binding' from (irb):46:in `times' from (irb):46 from /Users/schwarze/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `
' -- http://bugs.ruby-lang.org/