Somewhere in all of the ruby code that gets included into this app I am working on, there is something that defined String so that the following is a valid statement
puts "contact us at " + "info@abc.com" + " and say hello"
The app that runs, is able to include that stuff and Ruby doesn't complain. When I try to write a test module and include some of the code, ruby complains beuse my load paths or some part of the configuration is different. I am not really sure.
If I monkey patch string like below, it seems to stop the errors, but I am not sure if it could be causing other problems.
class String def (x=nil,b=nil) self end end
I am on windows, but I am using cygwin. I did something like what's below, but did not find where might be defined:
find . -name "*.rb" -exec grep -A 15 "class String" {} \; -print > / cygdrive/c/tmp/str-patch.txt
Any other ideas to figure this out ? How can I tell inside irb or something what the code is for "info@abc.com" or where it is defined ?