Sha256: 70dbd203de6223e3b9edd5ae1ee5002323371936827902261ec6044174ff2b7f
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
Syntax for indicating a filename There are two ways you can give a file name: - unadorned (without double-quotes) with possible escapes - as a double-quoted string with possible escapes in the string Probably most of the time a file name will be specified in the first form, without using quotes. If the file name however has a space or a colon in it, escape that character with a backslash. Also, if you need to enter a backslash and the character followinng that is unlucky enough to be a colon, space, or backslash use two backslashes. Some examples: irb.rb => irb.rb /tmp/irb.rb => /tmp/irb.rb C\:irb.rb => C:irb.rb C\:\irb.rb => C:\irb.rb C\:\\irb.rb => C:\irb.rb # Note: double slash not needed \\new.rb => \new.rb # Note: double slash, or filename has newline my\ file.rb => my file.rb The quoted string is useful if you have a file name that contains several characters that normally confuse the debugger parser, notably a space, newline, or a colon. The quoted string starts with a double quote ("). Escape sequences are allowed inside the string to be able to enter tabs or newlines, or a double quote inside the string. The list of translations is as follows: \t => <tab> \n => <newline> \" => " \\ => \ Here are some examples of quoted filenames: "This is a file with blanks.rb" => This is a file with blanks.rb "/tmp/RubyProgram \"foo\".rb => /tmp/RubyProgram "foo".rb "/Ruby\nProgram.rb" => /tmp/Ruby Program.rb
Version data entries
4 entries across 4 versions & 1 rubygems