From: Sam Duncan Date: 2013-02-27T13:35:02+09:00 Subject: Re: ruby split not working properly On 02/27/2013 05:24 PM, Scott Macri wrote: > I'm trying to run the following command in irb on a mac: > > something.split('\') > > This doesn't work either: > something.split("\") > > However, this just causes irb not return a result and prevents irb from > being useable and I have to close it. > > Any thoughts as to why this is happening? Is this a ruby bug? > > It only seems to happen with the \ only..... This is a serious problem > because I am attempting to parse the results of a Linux command which > contains many \'s. I have the exact same issue with: > something.delete('\') > > Please help.... Thanks. > 1.9.3p125 :001 > 'foo\bar'.split('\\') => ["foo", "bar"] Something like that? Sam