Terminal residue

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 <main>': undefined methodgrep’ 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.

Thanks

Chris

2009/8/7 Christopher S. [email protected]:

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 <main>': 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

Note the absence of Enumerable in String in 1.9.1. Maybe this helps
you hunt down the issue.

Kind regards

robert

Thanks for the help - I forgot that my .bash_login file had some ruby
code in it and sure enough, that was the culprit.

Chris