From: Robert Klemme Date: 2009-08-07T16:48:21+09:00 Subject: Re: terminal residue 2009/8/7 Christopher Small : > Something really weird just happened - I just installed Ruby 1.9.1 using > (essentially) Hivelogic's method for rolling out my own Ruby install in > my usr/local/src directory on my Mac running Leopard and although > everything seems to be working okay (ruby -v yeilds the correct > version), any time I enter anything into my terminal I get the normal > behavior except that the line > > -e:1:in `
': undefined method `grep' for "":String (NoMethodError) > > shows up at the end of whatever the terminal returns. Even just hitting > enter with nothing typed in at the prompt return the above line. Now, > this looks like a ruby Error message, but I have no idea why the system > would be returning this as it is. I did save the terminal output from > the install process, so I have records of everything that I did and > everything that happened. Has anyone ever seen anything like this or no > how I could get it fixed? Very strange stuff. I guess that this is related to a change in class String which might not be reflected in the code that uses it: $ ruby -ve '"".grep(/x/)' ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] $ ruby19 -ve '"".grep(/x/)' ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin] -e:1:in `
': undefined method `grep' for "":String (NoMethodError) $ ruby19 -ve 'puts String.ancestors' ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin] String Comparable Object Kernel BasicObject $ Note the absence of Enumerable in String in 1.9.1. Maybe this helps you hunt down the issue. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/