From: Dave Thomas Date: 2000-12-14T14:25:26+09:00 Subject: [ruby-talk:7196] Re: Put slash as last character in string? "Chris Morris" writes: > How can I have a string with a single backslash as the last character? > > "c:\temp\\" => "c:\temp\\" Just like that. If you're using irb to check it out, then you'll get slightly misleading output, as irb by default uses #inspect to display strings, and #inspect escapes special characters. Thus even though the string has just one '\', it is output by irb with two. irb(main):006:0> "abc\\" "abc\\" irb(main):007:0> conf.inspect_mode = nil Switch to non inspect mode. false irb(main):008:0> "abc\\" abc\ Regards Dave